aboutsummaryrefslogtreecommitdiffstats
path: root/codecs/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'codecs/CMakeLists.txt')
-rw-r--r--codecs/CMakeLists.txt35
1 files changed, 32 insertions, 3 deletions
diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt
index 63ac64d08d..9f4d64a1b2 100644
--- a/codecs/CMakeLists.txt
+++ b/codecs/CMakeLists.txt
@@ -44,9 +44,38 @@ if(SBC_FOUND)
set(CODECS_FILES ${CODECS_FILES} sbc/sbc.c)
endif()
-add_library(codecs STATIC
+set(codecs_LIBS
+ ${GMODULE2_LIBRARIES}
+ wsutil
+)
+
+add_library(codecs ${LINK_MODE_LIB}
${CODECS_FILES}
+ ${CMAKE_BINARY_DIR}/image/libwscodecs.rc
)
+
+set(FULL_SO_VERSION "0.0.0")
+
set_target_properties(codecs PROPERTIES
- LINK_FLAGS "${WS_LINK_FLAGS}"
- FOLDER "Libs")
+ PREFIX "libws"
+ COMPILE_DEFINITIONS "WS_BUILD_DLL"
+ LINK_FLAGS "${WS_LINK_FLAGS}"
+ VERSION ${FULL_SO_VERSION} SOVERSION 0
+ FOLDER "Libs"
+)
+
+if(ENABLE_APPLICATION_BUNDLE)
+ set_target_properties(codecs PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks
+ )
+endif()
+
+target_link_libraries(codecs ${codecs_LIBS})
+
+if(NOT ${ENABLE_STATIC})
+ install(TARGETS codecs
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+endif()