aboutsummaryrefslogtreecommitdiffstats
path: root/codecs
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2017-11-01 20:22:32 +0000
committerJoão Valverde <j@v6e.pt>2017-11-19 20:16:50 +0000
commit262a84c384353b2a88a6e81cdc499ab94a8316c2 (patch)
tree759ed52d7d81ce9e5ef21e338d235f94f53d77b0 /codecs
parent61bd626d5d10a7cd0e2dac667bbb262452fe906f (diff)
Fix (and chop) static build option
This sets the scope of the static build option to Wireshark support libraries only. Before the patch: Static plugins don't work with CMake and autotools. autotools static build is broken, and most likely will always be, as building Wireshark all-static is difficult and time-consuming. After the patch: For CMake Wireshark will be built with static or shared libraries and dynamic plugins. Everything just works. CMake apparently doesn't want you building static and shared libraries at the same time. For autotools Wireshark will be built with shared libraries by default. --disable-shared and --enable-static options work as usual. Dlopened plugins are not built if --disable-shared is given to configure (to disable shared libraries). This is a limitations imposed by libtool. Tested on Linux. This removes broken support for building plugins statically. Change-Id: Ib8e8176976f136eea93a2ce8f9857b6cf9bec64c Reviewed-on: https://code.wireshark.org/review/24241 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
Diffstat (limited to 'codecs')
-rw-r--r--codecs/CMakeLists.txt22
1 files changed, 10 insertions, 12 deletions
diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt
index 6f7f51cb4c..67697f6748 100644
--- a/codecs/CMakeLists.txt
+++ b/codecs/CMakeLists.txt
@@ -61,7 +61,7 @@ if(HAVE_BCG729)
list(APPEND wscodecs_LIBS ${BCG729_LIBRARIES})
endif()
-add_library(wscodecs ${LINK_MODE_LIB}
+add_library(wscodecs
${WSCODECS_FILES}
${CMAKE_BINARY_DIR}/image/libwscodecs.rc
)
@@ -84,18 +84,16 @@ endif()
target_link_libraries(wscodecs ${wscodecs_LIBS})
-if(NOT ${ENABLE_STATIC})
- install(TARGETS wscodecs
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- )
+install(TARGETS wscodecs
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
- if(NOT WIN32)
- install(FILES ${WSCODECS_PUBLIC_HEADERS}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/codecs"
- )
- endif()
+if(NOT WIN32)
+ install(FILES ${WSCODECS_PUBLIC_HEADERS}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${CPACK_PACKAGE_NAME}/codecs"
+ )
endif()
CHECKAPI(