From 96779de920fa5f308f29c35dce54d48e5d19b670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Thu, 18 Mar 2010 10:27:17 +0000 Subject: cmake changes: - Add checking for linker flags - Install plugins with the name including the Wireshark version. This will make it easier to find matching plugin versions if files get just copied over. svn path=/trunk/; revision=32231 --- CMakeLists.txt | 36 ++++++++++++++++++++++++++++++------ README.cmake | 1 - cmake/modules/CheckCLinkerFlag.cmake | 22 ++++++++++++++++++++++ codecs/CMakeLists.txt | 2 +- epan/CMakeLists.txt | 1 + epan/wslua/CMakeLists.txt | 9 +++++---- epan/wspython/CMakeLists.txt | 1 + gtk/CMakeLists.txt | 1 + plugins/asn1/CMakeLists.txt | 5 +++-- plugins/docsis/CMakeLists.txt | 6 +++--- plugins/ethercat/CMakeLists.txt | 6 +++--- plugins/giop/CMakeLists.txt | 20 ++++++++++++-------- plugins/gryphon/CMakeLists.txt | 5 +++-- plugins/interlink/CMakeLists.txt | 5 +++-- plugins/irda/CMakeLists.txt | 5 +++-- plugins/m2m/CMakeLists.txt | 5 +++-- plugins/mate/CMakeLists.txt | 5 +++-- plugins/opcua/CMakeLists.txt | 5 +++-- plugins/profinet/CMakeLists.txt | 5 +++-- plugins/sercosiii/CMakeLists.txt | 5 +++-- plugins/stats_tree/CMakeLists.txt | 5 +++-- plugins/tpg/CMakeLists.txt | 5 +++-- plugins/unistim/CMakeLists.txt | 5 +++-- plugins/wimax/CMakeLists.txt | 5 +++-- plugins/wimaxasncp/CMakeLists.txt | 5 +++-- wiretap/CMakeLists.txt | 1 + wsutil/CMakeLists.txt | 1 + 27 files changed, 123 insertions(+), 54 deletions(-) create mode 100644 cmake/modules/CheckCLinkerFlag.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index ee7a405d25..8fefccc917 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,12 +213,26 @@ else() add_definitions( -D_U_=\"\" ) endif() -# todo -# Same for linker flags, but it looks like it's do-it-yourself here -# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--as-needed]) -# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-flto]) -# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhopr]) -# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhole-program]) +set(WIRESHARK_LD_FLAGS + -Wl,--as-needed + # -flto + # -fwhopr + # -fwhole-program +) + +include(CheckCLinkerFlag) +set(C 0) +# Sigh: Have to use THIS_FLAG instead of ${F} for some reason +foreach(THIS_FLAG ${WIRESHARK_LD_FLAGS}) + set(F WS_LD_FLAG_${C}) + set(${F} ${THIS_FLAG}) + set(V WS_LD_FLAG_VALID${C}) + check_c_linker_flag(${${F}} ${V}) + if (${${V}}) + set(WS_LINK_FLAGS ${WS_LINK_FLAGS} ${${F}}) + endif() + math(EXPR C "${C} + 1") +endforeach() if(ENABLE_STATIC) set(LINK_MODE_LIB STATIC) @@ -643,6 +657,7 @@ if(BUILD_wireshark) ) add_executable(wireshark ${wireshark_FILES}) add_dependencies(wireshark svnversion) + set_target_properties(wireshark PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(wireshark ${wireshark_LIBS}) install(TARGETS wireshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -664,6 +679,7 @@ if(BUILD_tshark) ) add_executable(tshark ${tshark_FILES}) add_dependencies(tshark svnversion) + set_target_properties(tshark PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(tshark ${tshark_LIBS}) install(TARGETS tshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -679,6 +695,7 @@ if(BUILD_rawshark) ) add_executable(rawshark ${rawshark_FILES}) add_dependencies(rawshark svnversion) + set_target_properties(rawshark PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(rawshark ${rawshark_LIBS}) install(TARGETS rawshark RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -692,6 +709,7 @@ if(BUILD_dftest) util.c ) add_executable(dftest ${dftest_FILES}) + set_target_properties(dftest PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(dftest ${dftest_LIBS}) install(TARGETS dftest RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -711,6 +729,7 @@ if(BUILD_randpkt) randpkt.c ) add_executable(randpkt ${randpkt_FILES}) + set_target_properties(randpkt PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(randpkt ${randpkt_LIBS}) install(TARGETS randpkt RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -729,6 +748,7 @@ if(BUILD_text2pcap) ) add_executable(text2pcap ${text2pcap_FILES}) add_dependencies(text2pcap svnversion) + set_target_properties(text2pcap PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(text2pcap ${text2pcap_LIBS}) install(TARGETS text2pcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -745,6 +765,7 @@ if(BUILD_mergecap) ) add_executable(mergecap ${mergecap_FILES}) add_dependencies(mergecap svnversion) + set_target_properties(mergecap PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(mergecap ${mergecap_LIBS}) install(TARGETS mergecap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -761,6 +782,7 @@ if(BUILD_capinfos) ${WTAP_PLUGIN_SOURCES} ) add_executable(capinfos ${capinfos_FILES}) + set_target_properties(capinfos PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(capinfos ${capinfos_LIBS}) install(TARGETS capinfos RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -778,6 +800,7 @@ if(BUILD_editcap) ) add_executable(editcap ${editcap_FILES}) add_dependencies(editcap svnversion) + set_target_properties(editcap PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(editcap ${editcap_LIBS}) install(TARGETS editcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() @@ -812,6 +835,7 @@ if(BUILD_dumpcap) ) add_executable(dumpcap ${dumpcap_FILES}) add_dependencies(dumpcap svnversion) + set_target_properties(dumpcap PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(dumpcap ${dumpcap_LIBS}) install(TARGETS dumpcap RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) endif() diff --git a/README.cmake b/README.cmake index 7d1aeb062b..81b3e06367 100644 --- a/README.cmake +++ b/README.cmake @@ -84,7 +84,6 @@ What needs to be done? - Fix places in the cmake files marked as todo. - Add back (working) install target. Currently, directories are created with user umask -- Add back linker flags test - Build source package (using CPack). - Build rpm package (using CPack). - Build dpkg package (using CPack). diff --git a/cmake/modules/CheckCLinkerFlag.cmake b/cmake/modules/CheckCLinkerFlag.cmake new file mode 100644 index 0000000000..4181da05f6 --- /dev/null +++ b/cmake/modules/CheckCLinkerFlag.cmake @@ -0,0 +1,22 @@ +# - Check whether the C linker supports a given flag. +# CHECK_C_LINKER_FLAG(FLAG VARIABLE) +# +# FLAG - the compiler flag +# VARIABLE - variable to store the result +# +# This actually calls the check_c_source_compiles macro. +# See help for CheckCSourceCompiles for a listing of variables +# that can modify the build. + +# Copyright (c) 2010, Joerg Mayer (see AUTHORS file) +# +# Redistribution and use is allowed according to the terms of the BSD license. + +INCLUDE(CheckCSourceCompiles) + +MACRO (CHECK_C_LINKER_FLAG _FLAG _RESULT) + SET(CMAKE_REQUIRED_FLAGS "${_FLAG}") + message(status "check linker flag - test linker flags: ${CMAKE_REQUIRED_FLAGS}") + CHECK_C_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}) +ENDMACRO (CHECK_C_LINKER_FLAG) + diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt index 99b3f966a9..fc0c37e8d7 100644 --- a/codecs/CMakeLists.txt +++ b/codecs/CMakeLists.txt @@ -29,4 +29,4 @@ set(CODECS_FILES add_library(codecs STATIC ${CODECS_FILES} ) - +set_target_properties(codecs PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index e23150b771..2d166f0b04 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -1280,6 +1280,7 @@ add_library(epan ${LINK_MODE_LIB} ${DISSECTOR_SUPPORT_SRC} ${LIBWIRESHARK_ASM_FILES} ) +set_target_properties(epan PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) # By default the name for a library with target name epan will be libepan, # but Ethereal is now named Wireshark diff --git a/epan/wslua/CMakeLists.txt b/epan/wslua/CMakeLists.txt index b9c1a42029..c1dacd8a3e 100644 --- a/epan/wslua/CMakeLists.txt +++ b/epan/wslua/CMakeLists.txt @@ -122,16 +122,17 @@ set(wslua_LIBS ${LUA_LIBRARIES} ) -add_library(wslua STATIC - ${WSLUA_FILES} -) - add_custom_target( wsluaauxiliary ALL DEPENDS init.lua ) +add_library(wslua STATIC + ${WSLUA_FILES} +) +set_target_properties(wslua PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) + target_link_libraries(wslua ${wslua_LIBS}) install( diff --git a/epan/wspython/CMakeLists.txt b/epan/wspython/CMakeLists.txt index 9f02504164..9287188dc5 100644 --- a/epan/wspython/CMakeLists.txt +++ b/epan/wspython/CMakeLists.txt @@ -50,6 +50,7 @@ set(wspython_LIBS add_library(wspython STATIC ${WSPYTHON_FILES} ) +set_target_properties(wspython PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(wspython ${wspython_LIBS}) diff --git a/gtk/CMakeLists.txt b/gtk/CMakeLists.txt index 2b5a57fe84..bf392e3759 100644 --- a/gtk/CMakeLists.txt +++ b/gtk/CMakeLists.txt @@ -222,6 +222,7 @@ add_library(ui STATIC ${WIRESHARK_TAP_SRC} wireshark-tap-register.c ) +set_target_properties(ui PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) #install(TARGETS ui # LIBRARY DESTINATION lib diff --git a/plugins/asn1/CMakeLists.txt b/plugins/asn1/CMakeLists.txt index 0c6c73243b..960c68fe1d 100644 --- a/plugins/asn1/CMakeLists.txt +++ b/plugins/asn1/CMakeLists.txt @@ -58,12 +58,13 @@ add_library(asn1 ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(asn1 PROPERTIES PREFIX "") -#set_target_properties(asn1 PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(asn1 PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(asn1 PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(asn1 epan) install(TARGETS asn1 - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/docsis/CMakeLists.txt b/plugins/docsis/CMakeLists.txt index 2847468e54..e30973844c 100644 --- a/plugins/docsis/CMakeLists.txt +++ b/plugins/docsis/CMakeLists.txt @@ -87,13 +87,13 @@ add_library(docsis ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(docsis PROPERTIES PREFIX "") -#set_target_properties(docsis PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) - +set_target_properties(docsis PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(docsis PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(docsis epan) install(TARGETS docsis - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/ethercat/CMakeLists.txt b/plugins/ethercat/CMakeLists.txt index e50ccd87fb..15d66ce93b 100644 --- a/plugins/ethercat/CMakeLists.txt +++ b/plugins/ethercat/CMakeLists.txt @@ -59,13 +59,13 @@ add_library(ethercat ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(ethercat PROPERTIES PREFIX "") -#set_target_properties(ethercat PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) - +set_target_properties(ethercat PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(ethercat PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(ethercat epan) install(TARGETS ethercat - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/giop/CMakeLists.txt b/plugins/giop/CMakeLists.txt index cc383af6f9..793ae621ed 100644 --- a/plugins/giop/CMakeLists.txt +++ b/plugins/giop/CMakeLists.txt @@ -57,12 +57,13 @@ add_library(cosnaming ${LINK_MODE_MODULE} ${COSNAMING_SRC} ) set_target_properties(cosnaming PROPERTIES PREFIX "") -#set_target_properties(cosnaming PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(cosnaming PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(cosnaming PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(cosnaming epan) install(TARGETS cosnaming - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) @@ -71,12 +72,13 @@ add_library(coseventcomm ${LINK_MODE_MODULE} ${COSEVENTCOMM_SRC} ) set_target_properties(coseventcomm PROPERTIES PREFIX "") -#set_target_properties(coseventcomm PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(coseventcomm PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(coseventcomm PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(coseventcomm epan) install(TARGETS coseventcomm - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) @@ -85,12 +87,13 @@ add_library(tango ${LINK_MODE_MODULE} ${TANGO_SRC} ) set_target_properties(tango PROPERTIES PREFIX "") -#set_target_properties(tango PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(tango PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(tango PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(tango epan) install(TARGETS tango - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) @@ -99,12 +102,13 @@ add_library(parlay ${LINK_MODE_MODULE} ${PARLAY_SRC} ) set_target_properties(parlay PROPERTIES PREFIX "") -#set_target_properties(parlay PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(parlay PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(parlay PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(parlay epan) install(TARGETS parlay - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/gryphon/CMakeLists.txt b/plugins/gryphon/CMakeLists.txt index f847ffb1d0..395eb92d7c 100644 --- a/plugins/gryphon/CMakeLists.txt +++ b/plugins/gryphon/CMakeLists.txt @@ -53,12 +53,13 @@ add_library(gryphon ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(gryphon PROPERTIES PREFIX "") -#set_target_properties(gryphon PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(gryphon PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(gryphon PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(gryphon epan) install(TARGETS gryphon - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/interlink/CMakeLists.txt b/plugins/interlink/CMakeLists.txt index a4a9c495fe..c3b10e0af2 100644 --- a/plugins/interlink/CMakeLists.txt +++ b/plugins/interlink/CMakeLists.txt @@ -53,12 +53,13 @@ add_library(interlink ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(interlink PROPERTIES PREFIX "") -#set_target_properties(interlink PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(interlink PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(interlink PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(interlink epan) install(TARGETS interlink - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/irda/CMakeLists.txt b/plugins/irda/CMakeLists.txt index 88aa656c6c..f99f7cd5c6 100644 --- a/plugins/irda/CMakeLists.txt +++ b/plugins/irda/CMakeLists.txt @@ -55,12 +55,13 @@ add_library(irda ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(irda PROPERTIES PREFIX "") -#set_target_properties(irda PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(irda PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(irda PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(irda epan) install(TARGETS irda - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/m2m/CMakeLists.txt b/plugins/m2m/CMakeLists.txt index 9878043c31..a067cfde43 100644 --- a/plugins/m2m/CMakeLists.txt +++ b/plugins/m2m/CMakeLists.txt @@ -58,12 +58,13 @@ add_library(m2m ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(m2m PROPERTIES PREFIX "") -#set_target_properties(m2m PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(m2m PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(m2m PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(m2m epan) install(TARGETS m2m - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/mate/CMakeLists.txt b/plugins/mate/CMakeLists.txt index b3c61022df..e780c7da01 100644 --- a/plugins/mate/CMakeLists.txt +++ b/plugins/mate/CMakeLists.txt @@ -74,12 +74,13 @@ add_library(mate ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(mate PROPERTIES PREFIX "") -#set_target_properties(mate PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(mate PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(mate PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(mate epan) install(TARGETS mate - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/opcua/CMakeLists.txt b/plugins/opcua/CMakeLists.txt index bfc4ae0cee..9e529bd421 100644 --- a/plugins/opcua/CMakeLists.txt +++ b/plugins/opcua/CMakeLists.txt @@ -66,12 +66,13 @@ add_library(opcua ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(opcua PROPERTIES PREFIX "") -#set_target_properties(opcua PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(opcua PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(opcua PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(opcua epan) install(TARGETS opcua - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/profinet/CMakeLists.txt b/plugins/profinet/CMakeLists.txt index 704dec9e03..affdfdd0c3 100644 --- a/plugins/profinet/CMakeLists.txt +++ b/plugins/profinet/CMakeLists.txt @@ -65,12 +65,13 @@ add_library(profinet ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(profinet PROPERTIES PREFIX "") -#set_target_properties(profinet PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(profinet PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(profinet PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(profinet epan) install(TARGETS profinet - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/sercosiii/CMakeLists.txt b/plugins/sercosiii/CMakeLists.txt index e1b2a8eac4..e0a951bd75 100644 --- a/plugins/sercosiii/CMakeLists.txt +++ b/plugins/sercosiii/CMakeLists.txt @@ -64,12 +64,13 @@ add_library(sercosiii ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(sercosiii PROPERTIES PREFIX "") -#set_target_properties(sercosiii PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(sercosiii PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(sercosiii PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(sercosiii epan) install(TARGETS sercosiii - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/stats_tree/CMakeLists.txt b/plugins/stats_tree/CMakeLists.txt index d608e4f847..763d87d8e4 100644 --- a/plugins/stats_tree/CMakeLists.txt +++ b/plugins/stats_tree/CMakeLists.txt @@ -42,12 +42,13 @@ add_library(stats_tree ${LINK_MODE_MODULE} ${TAP_SRC} ) set_target_properties(stats_tree PROPERTIES PREFIX "") -#set_target_properties(stats_tree PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(stats_tree PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(stats_tree PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(stats_tree epan) install(TARGETS stats_tree - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/tpg/CMakeLists.txt b/plugins/tpg/CMakeLists.txt index 68086a0abd..a2bf906daa 100644 --- a/plugins/tpg/CMakeLists.txt +++ b/plugins/tpg/CMakeLists.txt @@ -74,12 +74,13 @@ add_library(tpg ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(tpg PROPERTIES PREFIX "") -#set_target_properties(tpg PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(tpg PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(tpg PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(tpg epan) install(TARGETS tpg - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/unistim/CMakeLists.txt b/plugins/unistim/CMakeLists.txt index 78e2eb78e0..67db8503e3 100644 --- a/plugins/unistim/CMakeLists.txt +++ b/plugins/unistim/CMakeLists.txt @@ -53,12 +53,13 @@ add_library(unistim ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(unistim PROPERTIES PREFIX "") -#set_target_properties(unistim PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(unistim PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(unistim PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(unistim epan) install(TARGETS unistim - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/wimax/CMakeLists.txt b/plugins/wimax/CMakeLists.txt index a2fd7d9007..c3bb5c151a 100644 --- a/plugins/wimax/CMakeLists.txt +++ b/plugins/wimax/CMakeLists.txt @@ -98,12 +98,13 @@ add_library(wimax ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(wimax PROPERTIES PREFIX "") -#set_target_properties(wimax PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(wimax PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(wimax PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(wimax epan) install(TARGETS wimax - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/plugins/wimaxasncp/CMakeLists.txt b/plugins/wimaxasncp/CMakeLists.txt index 737dbb7939..0b3700c58d 100644 --- a/plugins/wimaxasncp/CMakeLists.txt +++ b/plugins/wimaxasncp/CMakeLists.txt @@ -57,12 +57,13 @@ add_library(wimaxasncp ${LINK_MODE_MODULE} ${PLUGIN_FILES} ) set_target_properties(wimaxasncp PROPERTIES PREFIX "") -#set_target_properties(wimaxasncp PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(wimaxasncp PROPERTIES SOVERSION ${CPACK_PACKAGE_VERSION}) +set_target_properties(wimaxasncp PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(wimaxasncp epan) install(TARGETS wimaxasncp - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} NAMELINK_SKIP RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION} ) diff --git a/wiretap/CMakeLists.txt b/wiretap/CMakeLists.txt index b2fbbbdeeb..367c0e2798 100644 --- a/wiretap/CMakeLists.txt +++ b/wiretap/CMakeLists.txt @@ -101,6 +101,7 @@ set(wiretap_LIBS add_library(wiretap ${LINK_MODE_LIB} ${WIRETAP_FILES} ) +set_target_properties(wiretap PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(wiretap ${wiretap_LIBS}) diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 81b9eceace..96b96b70d5 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -43,6 +43,7 @@ set(wsutil_LIBS add_library(wsutil ${LINK_MODE_LIB} ${WSUTIL_FILES} ) +set_target_properties(wsutil PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS}) target_link_libraries(wsutil ${wsutil_LIBS}) -- cgit v1.2.3