cmake changes:
authorJörg Mayer <jmayer@loplof.de>
Thu, 18 Mar 2010 10:27:17 +0000 (10:27 -0000)
committerJörg Mayer <jmayer@loplof.de>
Thu, 18 Mar 2010 10:27:17 +0000 (10:27 -0000)
- 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

27 files changed:
CMakeLists.txt
README.cmake
cmake/modules/CheckCLinkerFlag.cmake [new file with mode: 0644]
codecs/CMakeLists.txt
epan/CMakeLists.txt
epan/wslua/CMakeLists.txt
epan/wspython/CMakeLists.txt
gtk/CMakeLists.txt
plugins/asn1/CMakeLists.txt
plugins/docsis/CMakeLists.txt
plugins/ethercat/CMakeLists.txt
plugins/giop/CMakeLists.txt
plugins/gryphon/CMakeLists.txt
plugins/interlink/CMakeLists.txt
plugins/irda/CMakeLists.txt
plugins/m2m/CMakeLists.txt
plugins/mate/CMakeLists.txt
plugins/opcua/CMakeLists.txt
plugins/profinet/CMakeLists.txt
plugins/sercosiii/CMakeLists.txt
plugins/stats_tree/CMakeLists.txt
plugins/tpg/CMakeLists.txt
plugins/unistim/CMakeLists.txt
plugins/wimax/CMakeLists.txt
plugins/wimaxasncp/CMakeLists.txt
wiretap/CMakeLists.txt
wsutil/CMakeLists.txt

index ee7a405d25aa5040d0719dfed1d4bb59bd074967..8fefccc9179b028cf8e92801143e64cb6aa67517 100644 (file)
@@ -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()
index 7d1aeb062ba49cf1e2d705dcc8dfb55d87693f3c..81b3e06367c7ad6a30071938831e606838db0a31 100644 (file)
@@ -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 (file)
index 0000000..4181da0
--- /dev/null
@@ -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)
+
index 99b3f966a9abf62ce8a9d29c41979ce7a9efb7c6..fc0c37e8d7f5af53f143b20a9db1802a85631dcc 100644 (file)
@@ -29,4 +29,4 @@ set(CODECS_FILES
 add_library(codecs STATIC
   ${CODECS_FILES}
 )
-
+set_target_properties(codecs PROPERTIES LINK_FLAGS ${WS_LINK_FLAGS})
index e23150b77191582c6ff23e4029d7a4a0321f06f2..2d166f0b0407cb93fc3c603a8d8e9a0075666a8e 100644 (file)
@@ -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
index b9c1a42029fdf4c8235f8e31d5de49d8b1bf7f94..c1dacd8a3e1e5ff2051a9fe9a11623461e52ab64 100644 (file)
@@ -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(
index 9f02504164506b8e402e1d2e2e8c0fb4c37c1662..9287188dc5e13abf0d3244d220c47347b61704a8 100644 (file)
@@ -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})
 
index 2b5a57fe846b184d629c5ad27256dcafc74a34f9..bf392e3759b268ab3457e7fe994dea5f74d334b7 100644 (file)
@@ -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
index 0c6c73243bbfccce30c6dbe87c60061498684fc7..960c68fe1dd6e3db4381fc1f1a2af0ce1401b9fe 100644 (file)
@@ -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}
 )
index 2847468e54c1a69e2e93a76a382effcbdf3d5b2b..e30973844c98aa4398429e8f7bac18ca72db9e66 100644 (file)
@@ -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}
 )
index e50ccd87fb36de4507161a5fa99339ce12a7c17c..15d66ce93b69364fc1c231a9ac36c48e8efe81cc 100644 (file)
@@ -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}
 )
index cc383af6f948d0e8de0c2f788c7602ab02bfc73f..793ae621ed0c427fb2c1964e8f5cc8c2c3827899 100644 (file)
@@ -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}
 )
index f847ffb1d0d9693cffb1c020425b0cfc5f05eafb..395eb92d7c9186f699789c0f69bfb146abf27123 100644 (file)
@@ -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}
 )
index a4a9c495fe82276de31202b35e57bd06ae8a8242..c3b10e0af2723c32228a78d4d8c7e050a00de8f8 100644 (file)
@@ -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}
 )
index 88aa656c6c05078af053895b7109d9aef414e6e6..f99f7cd5c69091ccf6e29ce94f888107dfd3d41e 100644 (file)
@@ -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}
 )
index 9878043c31516a5a4c1c5625709ae4bf993b9569..a067cfde432491fee36e9899bed652507a4bb331 100644 (file)
@@ -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}
 )
index b3c61022df3d27ed9a5c5a26eaeeed073a89e8e6..e780c7da018d6a6ffe15e57bf3ebc2a255e1ee80 100644 (file)
@@ -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}
 )
index bfc4ae0cee18b0bed05683734e8c1b16140354f1..9e529bd421c05e33a60ca95a1a65dd1898c15cc8 100644 (file)
@@ -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}
 )
index 704dec9e0305387e7c24e7fc0ecc869648b2e233..affdfdd0c313c2823f78f901742703b56fa14af2 100644 (file)
@@ -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}
 )
index e1b2a8eac46af03c09843221c3d5fc0767e9aed6..e0a951bd75c099b73979b7809cb5288b9c428a84 100644 (file)
@@ -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}
 )
index d608e4f847e4e2d900ddd4bbfba3e0531683367c..763d87d8e48d32b01ecbfa80ebea1428d63bd03e 100644 (file)
@@ -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}
 )
index 68086a0abd9e187ffecd5ecbbf4cfc41208c5803..a2bf906daa9b91a9a86759cbb3376222c5fc98b4 100644 (file)
@@ -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}
 )
index 78e2eb78e077dbd3815b0830508b284581257801..67db8503e36bb69daeb317b4a74b1cbb4edc3ede 100644 (file)
@@ -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}
 )
index a2fd7d900764fd37ffafec9e6e3cde9315d9979e..c3bb5c151a9dfa8c707a56326f2e0e8c0d2c0671 100644 (file)
@@ -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}
 )
index 737dbb793992c830c71d43cf9775d3dd113833d0..0b3700c58dfa422514c46b2605b1b8d661ccbcbe 100644 (file)
@@ -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}
 )
index b2fbbbdeeb6f5c45728da3b09e21488d036df362..367c0e27987df72357d5c140cd5c34a6cf72f878 100644 (file)
@@ -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})
 
index 81b9eceace0b268ed24dc9121191621043cb9753..96b96b70d56019d59698e89e52da242ebb612bf7 100644 (file)
@@ -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})