From e093954b5682b89d202e1515fd0bd3933be354ad Mon Sep 17 00:00:00 2001 From: Snaipe Date: Fri, 31 Jul 2015 12:01:02 +0200 Subject: [PATCH] Fixed typo in cmake tests & reordered configuration file generation to execute after option handling --- CMakeLists.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4bce470..c676d20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ endif() find_package(Gettext) find_package(Libintl) -if (GETTEXT_FOUND AND Libintl_FOUND) +if (GETTEXT_FOUND AND LIBINTL_LIB_FOUND) include(GettextTranslate) add_subdirectory(po) set(ENABLE_NLS 1) @@ -43,13 +43,6 @@ CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) find_package(PCRE) find_package(Libcsptr REQUIRED) -# Generate the configure file - -configure_file( - "${CMAKE_SOURCE_DIR}/src/config.h.in" - "${CMAKE_SOURCE_DIR}/src/config.h" -) - # List sources and headers set(SOURCE_FILES @@ -100,6 +93,13 @@ set(INTERFACE_FILES include/criterion/stats.h ) +# Generate the configure file + +configure_file( + "${CMAKE_SOURCE_DIR}/src/config.h.in" + "${CMAKE_SOURCE_DIR}/src/config.h" +) + include_directories(include src ${CSPTR_INCLUDE_DIRS}) add_library(criterion SHARED ${SOURCE_FILES} ${INTERFACE_FILES}) target_link_libraries(criterion ${CSPTR_LIBRARIES}) @@ -112,7 +112,7 @@ if (PCRE_FOUND) target_link_libraries(criterion ${PCRE_LIBRARIES}) endif() -if (LIBINTL_FOUND) +if (LIBINTL_LIB_FOUND) target_link_libraries(criterion ${LIBINTL_LIBRARIES}) endif()