aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-05-10 14:54:31 +0200
committerAnders Broman <a.broman58@gmail.com>2018-05-15 10:28:09 +0000
commit4c1690ac4783c7334462b4140a9c41526edbae44 (patch)
tree685a298bdd66b240c9ea51def81e7ebd82041a3f /epan
parente21da738262af2ba6cf72f46fdc045f0337ca27e (diff)
CMake: require at least CMake 3.5
CMake 3.11 with the Ninja generator started complaining about CMP0058 related to ui/qt/CMakeFiles/qtui_autogen.dir/RCCstock_iconsInfo.cmake amd other files (AUTORCC). While the policy could be set explicitly, let's try to modernize the CMake configuration: - Drop CMP0042, if this gives issues with macOS, then it must be solved in a different way using non-deprecated methods. - Drop CMP0054 and ensure that all if("${foo}") and if(${foo}) are converted to if(foo). - Remove string comparison against "-NOTFOUND", it already evaluates to false in an if condition. - Use CXX_STANDARD/CXX_STANDARD_REQUIRED for Qt 5.7 and newer. - Assume that copy_if_different can accept multiple sources (CMake 3.5). - Consistency: Out of the 60 CMake 3.11 FindXxx.cmake files that use find_library, 34 contain "XXX_LIBRAR" while 16 contain "Xxx_LIBRAR". Let's assume uppercase variables (now custom MaxMindDB include dirs are correctly used). CMake 3.5 was chosen as the next version because of its wide support. Ubuntu 14.04 ships with cmake3 3.5.1, Debian jessie-backports has 3.6.2, EPEL for CentOS/RHEL6 includes cmake3 3.6.1 and SLES12 SP2 has 3.5. Change-Id: I2fa7b94bf8cc78411f414987d17bab3a33dfb360 Reviewed-on: https://code.wireshark.org/review/27444 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/CMakeLists.txt9
-rw-r--r--epan/dissectors/CMakeLists.txt2
2 files changed, 2 insertions, 9 deletions
diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt
index c9aa901420..067bf8bfba 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -292,13 +292,6 @@ 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
${LIBWIRESHARK_FILES}
$<TARGET_OBJECTS:crypt>
@@ -307,7 +300,7 @@ add_library(epan
$<TARGET_OBJECTS:dissectors-corba>
$<TARGET_OBJECTS:ftypes>
$<TARGET_OBJECTS:wmem>
- ${wslua_sources}
+ $<$<BOOL:${HAVE_LIBLUA}>:$<TARGET_OBJECTS:wslua>>
${CMAKE_BINARY_DIR}/image/libwireshark.rc
)
diff --git a/epan/dissectors/CMakeLists.txt b/epan/dissectors/CMakeLists.txt
index 6448a216d1..756faa6363 100644
--- a/epan/dissectors/CMakeLists.txt
+++ b/epan/dissectors/CMakeLists.txt
@@ -215,7 +215,7 @@ set_target_properties(dissectors-corba PROPERTIES
COMPILE_DEFINITIONS "WS_BUILD_DLL"
)
-if(WIN32 AND "${CMAKE_GENERATOR}" STREQUAL "Visual Studio 12 2013 Win64")
+if(WIN32 AND CMAKE_GENERATOR STREQUAL "Visual Studio 12 2013 Win64")
# CORBA IDL dissectors are triggering a MSVC 2013 x64 /O2 bug leading to a NULL pointer dereference (see bug 12495)
target_compile_options(dissectors-corba PRIVATE $<$<CONFIG:Release>:/Ox> $<$<CONFIG:RelWithDebInfo>:/Ox>)
endif()