diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-22 14:13:40 -0500 |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-22 14:13:40 -0500 |
commit | ac888a15c885e2a9e4cba8251837892734399fd9 (patch) | |
tree | f3d59abff24f34e535dde29b5d9f439e02341ec8 /Modules | |
parent | 950399ec9dc30ee95be88ac11914e454576a1b38 (diff) | |
download | cmake-ac888a15c885e2a9e4cba8251837892734399fd9.tar.gz |
moved to c++ command
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindAndImportCMakeProject.cmake | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/Modules/FindAndImportCMakeProject.cmake b/Modules/FindAndImportCMakeProject.cmake deleted file mode 100644 index ac540b02bd..0000000000 --- a/Modules/FindAndImportCMakeProject.cmake +++ /dev/null @@ -1,76 +0,0 @@ -# FIND_AND_IMPORT_CMAKE_PROJECT can be used by projects to find other -# CMake projects. -# -# For example, the author of library FOO would include a file called -# FOOConfig.cmake in the project's distribution. Usually such a file -# would be configured and installed by FOO's CMake code into a -# directory such as PREFIX/lib/foo. -# -# The author of application BAR that uses FOO would include the -# following lines in BAR's CMake code: -# -# INCLUDE("${CMAKE_ROOT}/Modules/FindAndImportCMakeProject.cmake") -# FIND_AND_IMPORT_CMAKE_PROJECT(FOO_DIR FOOConfig.cmake lib/foo) -# -# When CMake is run to build BAR, FOO_DIR will be the only -# CMakeCache.txt entry that is needed for FOO. When FOO_DIR has been -# set correctly, FOOConfig.cmake will automatically be included to -# provide whatever settings are needed to use FOO. -# - -MACRO(FIND_AND_IMPORT_CMAKE_PROJECT dir_var config_file rel_path) - IF(NOT ${dir_var}) - # Get the system search path as a list. - IF(UNIX) - STRING(REGEX MATCHALL "[^:]+" ${dir_var}_SEARCH1 "$ENV{PATH}") - ELSE(UNIX) - STRING(REGEX REPLACE "\\\\" "/" ${dir_var}_SEARCH1 "$ENV{PATH}") - ENDIF(UNIX) - STRING(REGEX REPLACE "/;" ";" ${dir_var}_SEARCH2 "${${dir_var}_SEARCH1}") - - # Construct a set of paths relative to the system search path. - SET(${dir_var}_SEARCH ${${dir_var}_SEARCH_PATH}) - FOREACH(dir ${${dir_var}_SEARCH2}) - SET(${dir_var}_SEARCH ${${dir_var}_SEARCH} "${dir}/../${rel_path}") - ENDFOREACH(dir) - - # Look for the configuration file. - FIND_PATH(${dir_var} ${config_file} - # Search user paths and relative to system search path. - ${${dir_var}_SEARCH} - - # Look in standard UNIX install locations. - "/usr/local/${rel_path}" - "/usr/${rel_path}" - - # Read from the CMakeSetup registry entries. It is likely that - # the project will have been recently built. - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]" - "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]" - - # Help the user find it if we cannot. - DOC "The directory containing ${config_file}." - ) - ENDIF(NOT ${dir_var}) - - # If the configuration file was found, load it. - IF(${dir_var}) - IF(EXISTS "${${dir_var}}/${config_file}") - # We found the configuration file. Load the settings from it. - INCLUDE("${${dir_var}}/${config_file}") - ELSE(EXISTS "${${dir_var}}/${config_file}") - IF(NOT ${dir_var}_NO_COMPLAIN) - MESSAGE(SEND_ERROR "${dir_var} has been set to a directory " - "that does not contain ${config_file}.") - ENDIF(NOT ${dir_var}_NO_COMPLAIN) - ENDIF(EXISTS "${${dir_var}}/${config_file}") - ENDIF(${dir_var}) -ENDMACRO(FIND_AND_IMPORT_CMAKE_PROJECT) |