diff options
author | Lukáš Lalinský <lalinsky@gmail.com> | 2011-04-09 19:51:23 +0200 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2011-04-09 19:51:23 +0200 |
commit | 1596dc7c696c76ba471410437b15b6b0914c84e0 (patch) | |
tree | 773f836b21b39af321b8d31a9582a57af6713e39 /ConfigureChecks.cmake | |
parent | f3d3af9355b490ad92ab6e257c1ba872500eb3c1 (diff) |
Clean up the main CMakeLists.txt file
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 3bbf2485..e4a6d1fa 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -1,8 +1,3 @@ -# NOTE: only add something here if it is really needed by all of kdelibs. -# Otherwise please prefer adding to the relevant config-foo.h.cmake file, -# and the CMakeLists.txt that generates it (or a separate ConfigureChecks.make file if you prefer) -# to minimize recompilations and increase modularity. - include(CheckIncludeFile) include(CheckIncludeFiles) include(CheckSymbolExists) @@ -11,18 +6,18 @@ include(CheckLibraryExists) include(CheckTypeSize) include(CheckCXXSourceCompiles) -#check for libz using the cmake supplied FindZLIB.cmake -FIND_PACKAGE(ZLIB) +# check for libz using the cmake supplied FindZLIB.cmake +find_package(ZLIB) +if(ZLIB_FOUND) + set(HAVE_ZLIB 1) +else() + set(HAVE_ZLIB 0) +endif() -IF(ZLIB_FOUND) - SET(HAVE_ZLIB 1) -ELSE(ZLIB_FOUND) - SET(HAVE_ZLIB 0) -ENDIF(ZLIB_FOUND) +set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) +find_package(CppUnit) +if(NOT CppUnit_FOUND AND BUILD_TESTS) + message(STATUS "CppUnit not found, disabling tests.") + set(BUILD_TESTS OFF) +endif() -SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) -FIND_PACKAGE(CppUnit) -IF (NOT CppUnit_FOUND AND BUILD_TESTS) - MESSAGE(STATUS "CppUnit not found, disabling tests.") - SET(BUILD_TESTS OFF) -ENDIF(NOT CppUnit_FOUND AND BUILD_TESTS) |