aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-01-05 09:09:40 -0800
committerGerald Combs <gerald@wireshark.org>2018-01-11 00:58:43 +0000
commit5639b8014afd467ddf25b18dcfe993b497c97caa (patch)
treeb7892a66e89bce8bc9c1cba81d2e2743db6036dc /cmake
parent841e24d304312cf89c5841f6624ae99f7ed0a589 (diff)
Use an enum for plugin types.
Make plugins.c the source of truth for plugin names. Where plugins reside and what they do are two different things, so split the plugin directory and description into two separate elements. CMake creates portable[1] builds on Windows and macOS. That is, the build-time directory layout is the same as the installation directory layout. Adjust various plugin paths macOS accordingly. [1] You have to run osx-app.sh on macOS to prepare the application bundle, but the goal is to create a directory/bundle that can be moved or copied to a different system and run in the new location. Change-Id: Icf9d02e61918fdf1404468baf52542910edf2743 Reviewed-on: https://code.wireshark.org/review/25166 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/WiresharkPlugin.cmake17
1 files changed, 11 insertions, 6 deletions
diff --git a/cmake/modules/WiresharkPlugin.cmake b/cmake/modules/WiresharkPlugin.cmake
index 6c0e6d37b8..52a1b566b1 100644
--- a/cmake/modules/WiresharkPlugin.cmake
+++ b/cmake/modules/WiresharkPlugin.cmake
@@ -41,15 +41,20 @@ macro(ADD_PLUGIN_LIBRARY _plugin _subfolder)
FOLDER "Plugins"
)
- # LIBRARY_OUTPUT_DIRECTORY alone appears to be sufficient.
- set_target_properties(${_plugin} PROPERTIES
- #ARCHIVE_OUTPUT_DIRECTORY ${PLUGIN_DIR}
- LIBRARY_OUTPUT_DIRECTORY ${PLUGIN_DIR}
- #RUNTIME_OUTPUT_DIRECTORY ${PLUGIN_DIR}
+ if(ENABLE_APPLICATION_BUNDLE)
+ set_target_properties(${_plugin} PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${PLUGIN_DIR}/${_subfolder}
+ )
+ else()
+ # Why don't we just write to ${PLUGIN_DIR}/${_subfolder}
+ # everywhere?
+ set_target_properties(${_plugin} PROPERTIES
+ LIBRARY_OUTPUT_DIRECTORY ${PLUGIN_DIR}
)
+endif()
# Try to force output to ${PLUGIN_DIR} without the configuration
- # type appended. Needed for CPack on Windows.
+ # type appended. Needed on Windows.
foreach(_config_type ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${_config_type} _config_upper)
set_target_properties(${_plugin} PROPERTIES