[brlcad-commits] SF.net SVN: brlcad:[34768]
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <ra...@us...> - 2009-06-19 08:21:07
|
Revision: 34768 http://brlcad.svn.sourceforge.net/brlcad/?rev=34768&view=rev Author: ralith Date: 2009-06-19 08:21:05 +0000 (Fri, 19 Jun 2009) Log Message: ----------- Improved CMake's ability to find libbu and libged when pkgconfig hints are unavailable by a great deal. Modified Paths: -------------- rt^3/trunk/cmake/Findlibbu.cmake rt^3/trunk/cmake/Findlibged.cmake Modified: rt^3/trunk/cmake/Findlibbu.cmake =================================================================== --- rt^3/trunk/cmake/Findlibbu.cmake 2009-06-19 07:39:19 UTC (rev 34767) +++ rt^3/trunk/cmake/Findlibbu.cmake 2009-06-19 08:21:05 UTC (rev 34768) @@ -10,16 +10,26 @@ # Use pkg-config to get hints about paths libfind_pkg_check_modules(libbu_PKGCONF libbu) +set(libbu_LIB_PREFIX_GUESSES $ENV{BRLCAD_ROOT}/lib) +set(libbu_INC_PREFIX_GUESSES $ENV{BRLCAD_ROOT}/include) + +if (WIN32) + # TODO: Guess default install locations on windows +elseif (UNIX) + set(libbu_LIB_PREFIX_GUESSES ${libbu_LIB_PREFIX_GUESSES} /usr/brlcad/lib /usr/local/brlcad/lib) + set(libbu_INC_PREFIX_GUESSES ${libbu_INC_PREFIX_GUESSES} /usr/brlcad/include /usr/local/brlcad/include) +endif () + # Include dir find_path(libbu_INCLUDE_DIR NAMES brlcad/bu.h - PATHS ${libbu_PKGCONF_INCLUDEDIR} + PATHS ${libbu_PKGCONF_INCLUDEDIR} ${libbu_INC_PREFIX_GUESSES} ) # Finally the library itself find_library(libbu_LIBRARY NAMES bu - PATHS ${libbu_PKGCONF_LIBDIR} + PATHS ${libbu_PKGCONF_LIBDIR} ${libbu_LIB_PREFIX_GUESSES} ) # Set the include dir variables and the libraries and let libfind_process do the rest. Modified: rt^3/trunk/cmake/Findlibged.cmake =================================================================== --- rt^3/trunk/cmake/Findlibged.cmake 2009-06-19 07:39:19 UTC (rev 34767) +++ rt^3/trunk/cmake/Findlibged.cmake 2009-06-19 08:21:05 UTC (rev 34768) @@ -10,16 +10,26 @@ # Use pkg-config to get hints about paths libfind_pkg_check_modules(libged_PKGCONF libged) +set(libged_LIB_PREFIX_GUESSES $ENV{BRLCAD_ROOT}/lib) +set(libged_INC_PREFIX_GUESSES $ENV{BRLCAD_ROOT}/include) + +if (WIN32) + # TODO: Guess default install locations on windows +elseif (UNIX) + set(libged_LIB_PREFIX_GUESSES ${libged_LIB_PREFIX_GUESSES} /usr/brlcad/lib /usr/local/brlcad/lib) + set(libged_INC_PREFIX_GUESSES ${libged_INC_PREFIX_GUESSES} /usr/brlcad/include /usr/local/brlcad/include) +endif () + # Include dir find_path(libged_INCLUDE_DIR NAMES brlcad/ged.h - PATHS ${libged_PKGCONF_INCLUDEDIR} + PATHS ${libged_PKGCONF_INCLUDEDIR} ${libged_INC_PREFIX_GUESSES} ) # Finally the library itself find_library(libged_LIBRARY NAMES ged - PATHS ${libged_PKGCONF_LIBDIR} + PATHS ${libged_PKGCONF_LIBDIR} ${libged_LIB_PREFIX_GUESSES} ) # Set the include dir variables and the libraries and let libfind_process do the rest. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |