diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-10-17 01:24:44 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2017-10-17 03:02:52 +0000 |
commit | 3d78077f7a3e72722407649768f1b677b4e63180 (patch) | |
tree | 2f19e3158274c99ac93714befa1862859ac59a39 | |
parent | b6ab30127583d38dcf0d49548e842c410ae2c69a (diff) |
CMake: fix build regression with CMake 3.0
This kind of generator expressions do not seem to work in CMake 3.0. It
works fine in CMake 3.1.0 and later versions.
Change-Id: I262566a5ea831ae0fbe4b6a3249b59401f9d3b15
Fixes: v2.5.0rc0-1334-gd3f636ece0 ("cmake: fix CMP0026 deprecation warning in CMake 3.9")
Reviewed-on: https://code.wireshark.org/review/23949
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | epan/CMakeLists.txt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 8f6c2ee975..06b82052b4 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -331,6 +331,13 @@ set_source_files_properties( COMPILE_FLAGS "${WERROR_COMMON_FLAGS}" ) +# Cannot use $<$<BOOL:${HAVE_LIBLUA}>:$<TARGET_OBJECTS:wslua>> as that breaks +# with CMake 3.0 (CMake 3.1 is OK) +if(HAVE_LIBLUA) + set(wslua_sources $<TARGET_OBJECTS:wslua>) +else() + set(wslua_sources) +endif() add_library(epan ${LINK_MODE_LIB} ${LIBWIRESHARK_FILES} ${GENERATED_FILES} @@ -342,7 +349,7 @@ add_library(epan ${LINK_MODE_LIB} $<TARGET_OBJECTS:dissectors-corba> $<TARGET_OBJECTS:ftypes> $<TARGET_OBJECTS:wmem> - $<$<BOOL:${HAVE_LIBLUA}>:$<TARGET_OBJECTS:wslua>> + ${wslua_sources} ${CMAKE_BINARY_DIR}/image/libwireshark.rc ) |