summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-16 13:08:45 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-16 13:08:45 (GMT)
commit5bd38eb630250ac3a69c6c9dfe0e62cd41dce0c0 (patch)
tree5a6983f21543f2814bc25b52e23f610ef583ae43 /Modules
parent1941b1c5d296757315cc894a3b054740b8ea07cd (diff)
downloadCMake-5bd38eb630250ac3a69c6c9dfe0e62cd41dce0c0.zip
CMake-5bd38eb630250ac3a69c6c9dfe0e62cd41dce0c0.tar.gz
CMake-5bd38eb630250ac3a69c6c9dfe0e62cd41dce0c0.tar.bz2
ENH: also add the install base dir of the running cmake to the search
directories for the FIND_XXX() commands, for the case that somebody has its own install tree Alex
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Platform/UnixPaths.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake
index c081407..8089bad 100644
--- a/Modules/Platform/UnixPaths.cmake
+++ b/Modules/Platform/UnixPaths.cmake
@@ -1,3 +1,8 @@
+# also add the install directory of the running cmake to the search directories
+# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up
+GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH)
+GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH)
+
SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
# Standard
/include /usr/include /usr/local/include
@@ -11,6 +16,7 @@ SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH}
# Other
/opt/local/include /usr/pkg/include
/opt/csw/include /opt/include
+ "${_CMAKE_INSTALL_DIR}/include"
)
SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
@@ -26,10 +32,12 @@ SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH}
# Other
/opt/local/lib /usr/pkg/lib
/opt/csw/lib /opt/lib
+ "${_CMAKE_INSTALL_DIR}/lib"
)
SET(CMAKE_SYSTEM_PROGRAM_PATH ${CMAKE_SYSTEM_PROGRAM_PATH}
/bin /usr/bin /usr/local/bin /usr/pkg/bin /sbin
+ "${_CMAKE_INSTALL_DIR}/bin"
)
SET(CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES