From 25e1e2c8489e46e539e51c780e3d58e0f1df8104 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 19 Dec 2018 16:46:40 -0800 Subject: [PATCH] CMake: Don't bundle our libraries at compile time. Setting LIBRARY_OUTPUT_DIRECTORY to Wireshark.app/Contents/Frameworks for each of our libraries ends up installing a fully versioned .dylib along with soversion and unversioned symlinks, which is more than we want and which wastes disk space when osx-app.sh dsymifies our libraries. Leave LIBRARY_OUTPUT_DIRECTORY unset and depend on osx-app.sh to copy our libraries into place. Bug: 15361 Change-Id: If0fbaa796b4be806e2aa13887e511a330fe55df5 Reviewed-on: https://code.wireshark.org/review/31139 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- CMakeLists.txt | 3 +++ codecs/CMakeLists.txt | 16 ---------------- epan/CMakeLists.txt | 13 ------------- wiretap/CMakeLists.txt | 13 ------------- wsutil/CMakeLists.txt | 14 -------------- 5 files changed, 3 insertions(+), 56 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9b3bee888..5975b78d68 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2137,6 +2137,9 @@ if(ENABLE_APPLICATION_BUNDLE) "-Wl,-headerpad_max_install_names -Wl,-search_paths_first ${CMAKE_EXE_LINKER_FLAGS}" ) + # Create our Frameworks directory + file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/run/${CMAKE_CFG_INTDIR}/Wireshark.app/Contents/Frameworks") + # Add files to the app bundle # Wireshark.app/Contents file(WRITE ${CMAKE_BINARY_DIR}/packaging/macosx/PkgInfo "APPLWshk\n") diff --git a/codecs/CMakeLists.txt b/codecs/CMakeLists.txt index 9d912461a5..54e1eec77f 100644 --- a/codecs/CMakeLists.txt +++ b/codecs/CMakeLists.txt @@ -62,22 +62,6 @@ set_target_properties(wscodecs PROPERTIES FOLDER "DLLs" ) -if(ENABLE_APPLICATION_BUNDLE) - set_target_properties(wscodecs PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks - ) - if(NOT CMAKE_CFG_INTDIR STREQUAL ".") - # Xcode - set_target_properties(wscodecs PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/$/Wireshark.app/Contents/Frameworks - ) - else() - set_target_properties(wscodecs PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks - ) - endif() -endif() - target_link_libraries(wscodecs ${wscodecs_LIBS}) install(TARGETS wscodecs diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index ff9ca8f2d9..8bba076f0d 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -295,19 +295,6 @@ set_target_properties(epan PROPERTIES VERSION "0.0.0" SOVERSION 0 ) -if(ENABLE_APPLICATION_BUNDLE) - if(NOT CMAKE_CFG_INTDIR STREQUAL ".") - # Xcode - set_target_properties(epan PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/$/Wireshark.app/Contents/Frameworks - ) - else() - set_target_properties(epan PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks - ) - endif() -endif() - ABICHECK(libwireshark) set(TOP_LEVEL_HEADERS ${CMAKE_BINARY_DIR}/config.h) diff --git a/wiretap/CMakeLists.txt b/wiretap/CMakeLists.txt index d9b1ce6623..7233701f6b 100644 --- a/wiretap/CMakeLists.txt +++ b/wiretap/CMakeLists.txt @@ -121,19 +121,6 @@ set_target_properties(wiretap PROPERTIES FOLDER "DLLs" ) -if(ENABLE_APPLICATION_BUNDLE) - if(NOT CMAKE_CFG_INTDIR STREQUAL ".") - # Xcode - set_target_properties(wiretap PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/$/Wireshark.app/Contents/Frameworks - ) - else() - set_target_properties(wiretap PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks - ) - endif() -endif() - ABICHECK(libwiretap) add_custom_command(OUTPUT libwiretap.abi.tar.gz diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 38115b5311..8120191175 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -249,20 +249,6 @@ set_target_properties(wsutil PROPERTIES FOLDER "DLLs" ) -if(ENABLE_APPLICATION_BUNDLE) - - if(NOT CMAKE_CFG_INTDIR STREQUAL ".") - # Xcode - set_target_properties(wsutil PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/$/Wireshark.app/Contents/Frameworks - ) - else() - set_target_properties(wsutil PROPERTIES - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/Frameworks - ) - endif() -endif() - ABICHECK(libwsutil) add_custom_command(OUTPUT libwsutil.abi.tar.gz