diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2011-12-01 23:47:41 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2011-12-01 23:47:41 +0000 |
commit | 1eaceca55c7e62892fd28bfbb5fc03240a48cee3 (patch) | |
tree | 7243fcd09c57e06e72b15f0044fd2c77babd7843 /contrib/cmake/cmake_work/FindConfig.cmake | |
parent | d4b5ddf4bcacd692011f5a597025c38a1262d6ca (diff) | |
parent | 429e46051dba814e7d6c74368eb1bba550222cbe (diff) | |
download | libconfig-1eaceca55c7e62892fd28bfbb5fc03240a48cee3.tar.gz |
Merge commit 'upstream/1.4.8'
Conflicts:
debian/changelog
debian/control
debian/libconfig++9-dev.install
debian/libconfig8.install
debian/libconfig9-dev.install
debian/rules
Diffstat (limited to 'contrib/cmake/cmake_work/FindConfig.cmake')
-rw-r--r-- | contrib/cmake/cmake_work/FindConfig.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/contrib/cmake/cmake_work/FindConfig.cmake b/contrib/cmake/cmake_work/FindConfig.cmake new file mode 100644 index 0000000..5361d96 --- /dev/null +++ b/contrib/cmake/cmake_work/FindConfig.cmake @@ -0,0 +1,23 @@ +FIND_PATH(CONFIG_INCLUDE_DIR libconfig.h /usr/include /usr/local/include) + +FIND_LIBRARY(CONFIG_LIBRARY NAMES config PATH /usr/lib /usr/local/lib) + +IF (CONFIG_INCLUDE_DIR AND CONFIG_LIBRARY) + SET(CONFIG_FOUND TRUE) +ENDIF ( CONFIG_INCLUDE_DIR AND CONFIG_LIBRARY) + +IF (CONFIG_FOUND) + IF (NOT CONFIG_FIND_QUIETLY) + MESSAGE(STATUS "Found Config: ${CONFIG_LIBRARY}") + ENDIF (NOT CONFIG_FIND_QUIETLY) +ELSE(CONFIG_FOUND) + IF (Config_FIND_REQUIRED) + IF(NOT CONFIG_INCLUDE_DIR) + MESSAGE(FATAL_ERROR "Could not find LibConfig header file!") + ENDIF(NOT CONFIG_INCLUDE_DIR) + + IF(NOT CONFIG_LIBRARY) + MESSAGE(FATAL_ERROR "Could not find LibConfig library file!") + ENDIF(NOT CONFIG_LIBRARY) + ENDIF (Config_FIND_REQUIRED) +ENDIF (CONFIG_FOUND)
\ No newline at end of file |