From f665244010bd78d6978b862a0c3ebf4943fa235c Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 23 Jan 2017 21:48:44 +1100 Subject: [PATCH] cmake: avoid passing around CFLAGS --- CMakeLists.txt | 22 +++++++++++----------- cmake | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a970073c..7072135c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ search_libs (DL_LIBS dlopen dl) search_libs (CLOCK_LIB clock_gettime rt c) search_libs (MATH_LIB cos m) -list (APPEND LIBS ${SHM_LIIBS} ${DL_LIBS} ${CLOCK_LIB} ${MATH_LIB}) +list (APPEND LIBS ${SHM_LIBS} ${DL_LIBS} ${CLOCK_LIB} ${MATH_LIB}) ############################################################################### @@ -102,6 +102,7 @@ list ( posix/fd.hpp ) + if (NOT WINDOWS) list ( APPEND UTIL_FILES @@ -418,22 +419,14 @@ list ( ############################################################################### add_library(cruft-util ${UTIL_FILES}) - - -############################################################################### -set (LIBS "cruft-util;${LIBS}") - -get_directory_property(HAS_PARENT PARENT_DIRECTORY) -if (HAS_PARENT) - set (CRUFT_UTIL_LIBS ${LIBS} PARENT_SCOPE) -endif () +target_link_libraries (cruft-util ${LIBS}) ############################################################################### foreach (tool hash json-clean json-schema json-validate scratch) add_executable (util_${tool} tools/${tool}.cpp) set_target_properties (util_${tool} PROPERTIES OUTPUT_NAME ${tool}) - target_link_libraries (util_${tool} ${LIBS}) + target_link_libraries (util_${tool} cruft-util) endforeach () @@ -448,5 +441,12 @@ endif () ############################################################################### +get_directory_property (HAS_PARENT PARENT_DIRECTORY) +if (HAS_PARENT) + set (CRUFT_UTIL_FOUND 1 PARENT_SCOPE) +endif () + + +##----------------------------------------------------------------------------- configure_file(libcruft-util-system.pc.in libcruft-util.pc) configure_file(Doxyfile.in Doxyfile) diff --git a/cmake b/cmake index 2d9f884c..7df08f68 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 2d9f884cbc3d2312582fd8009712264855e3f0b7 +Subproject commit 7df08f681817fec591dd77f7be23eff5c6778aaa