comparison libcommon/CMakeLists.txt @ 513:928a40398dec

CMake: split options and conditions, closes #716 As described in the issue, the CMake process force off a cache variable when a condition is not met. If the user installs the requirements and re-run CMake it must also set the variable to on which is inconvenient. The new process is to add a secondary variable and do not touch user defined options.
author David Demelier <markand@malikania.fr>
date Mon, 23 Oct 2017 21:30:17 +0200
parents 9fcdd3c9cd33
children 16b9ebfd3f08
comparison
equal deleted inserted replaced
512:b8da1d8c2a72 513:928a40398dec
41 ${libcommon_SOURCE_DIR}/irccd/options.cpp 41 ${libcommon_SOURCE_DIR}/irccd/options.cpp
42 ${libcommon_SOURCE_DIR}/irccd/system.cpp 42 ${libcommon_SOURCE_DIR}/irccd/system.cpp
43 ${libcommon_SOURCE_DIR}/irccd/util.cpp 43 ${libcommon_SOURCE_DIR}/irccd/util.cpp
44 ) 44 )
45 45
46 if (NOT WITH_SSL) 46 if (NOT HAVE_SSL)
47 list(APPEND FLAGS NET_NO_SSL) 47 list(APPEND FLAGS NET_NO_SSL)
48 endif () 48 endif ()
49 49
50 irccd_define_library( 50 irccd_define_library(
51 TARGET libcommon 51 TARGET libcommon
57 LIBRARIES 57 LIBRARIES
58 extern-json 58 extern-json
59 ${Boost_LIBRARIES} 59 ${Boost_LIBRARIES}
60 $<$<BOOL:${WIN32}>:shlwapi> 60 $<$<BOOL:${WIN32}>:shlwapi>
61 $<$<BOOL:${WIN32}>:ws2_32> 61 $<$<BOOL:${WIN32}>:ws2_32>
62 $<$<BOOL:${WITH_SSL}>:OpenSSL::SSL> 62 $<$<BOOL:${HAVE_SSL}>:OpenSSL::SSL>
63 $<$<BOOL:${WITH_SSL}>:OpenSSL::Crypto> 63 $<$<BOOL:${HAVE_SSL}>:OpenSSL::Crypto>
64 PUBLIC_INCLUDES 64 PUBLIC_INCLUDES
65 ${Boost_INCLUDE_DIRS} 65 ${Boost_INCLUDE_DIRS}
66 $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}> 66 $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
67 $<BUILD_INTERFACE:${libcommon_SOURCE_DIR}/irccd> 67 $<BUILD_INTERFACE:${libcommon_SOURCE_DIR}/irccd>
68 $<BUILD_INTERFACE:${libcommon_SOURCE_DIR}> 68 $<BUILD_INTERFACE:${libcommon_SOURCE_DIR}>