From 41c5261690d4868a29946c119d15510440c99115 Mon Sep 17 00:00:00 2001 From: Carl Norum Date: Wed, 21 Dec 2022 13:12:47 -0800 Subject: [PATCH] cmake: update macOS build instructions for the app build builds The application build should be used for a mac os build, and these changes should create a standalone app that can be transferred to the applications with all the plugin information needed as part of the setup. Signed-off-by: Charles Hardin --- CMakeLists.txt | 10 ++++++++++ README.md | 12 +++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a7469d..a7e511b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,6 +131,16 @@ else(Wireshark_FOUND) DESTINATION ${PLUGIN_INSTALL_VERSION_LIBDIR}/epan NAMELINK_SKIP ) + if(APPLE) + add_custom_target(v2glua + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/dissector/v2g.lua + ${CMAKE_BINARY_DIR}/run/Wireshark.app/Contents/PlugIns/wireshark + DEPENDS v2gexi + ) + add_dependencies(plugins v2glua) + endif() + file(GLOB PLUGIN_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.h") CHECKAPI( NAME diff --git a/README.md b/README.md index d0423a8..44909c6 100644 --- a/README.md +++ b/README.md @@ -144,12 +144,14 @@ the build steps. ``` mkdir -p build && cd build - # brew doesn't setup cmake correctly - so qt5 path might be different - env CMAKE_PREFIX_PATH=$(brew --prefix)/Cellar/qt@5/5.15.5_1 \ - cmake .. + # brew qt is not in a directly findable place, so tell cmake about it + env CMAKE_PREFIX_PATH=$(brew list qt5 | grep Qt5CoreConfig.cmake | \ + sed -e 's@/lib/cmake.*$@@') cmake .. - make VERBOSE=1 - sudo make install + make -j$(sysctl -n hw.ncpu) plugins app_bundle + + # Recommended installation directory + cp -r run/Wireshark.app /Applications/ ``` ### Windows