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>
This commit is contained in:
Peter Wu 2017-10-17 01:24:44 +01:00
parent b6ab301275
commit 3d78077f7a
1 changed files with 8 additions and 1 deletions

View File

@ -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
)