diff options
author | Joerg Mayer <jmayer@loplof.de> | 2018-02-15 20:43:07 +0100 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2018-05-24 17:03:51 +0000 |
commit | 4b665e26492b60375f532d1b3349e9cb64866d2a (patch) | |
tree | 274d4feccb83d0ebfd1a4243676e559d0656272d /CMakeListsCustom.txt.example | |
parent | f23306e847ac274f56364e3b85d2095222e261bf (diff) |
Allow extra plugins to be missing e.g. because they are in another branch
and still succeed with CMake.
Update the example paths to add epan while at it.
Change-Id: I92d21cc5699e784d7e151d18103d7e44078a40ab
Reviewed-on: https://code.wireshark.org/review/25812
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'CMakeListsCustom.txt.example')
-rw-r--r-- | CMakeListsCustom.txt.example | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeListsCustom.txt.example b/CMakeListsCustom.txt.example index 32c62c2dea..abbf603ea6 100644 --- a/CMakeListsCustom.txt.example +++ b/CMakeListsCustom.txt.example @@ -9,12 +9,26 @@ # Add a list of your custom plugins SRC dir here including the path # +# Fail CMake stage if any of these plugins are missing from source tree set(CUSTOM_PLUGIN_SRC_DIR # private_plugins/foo # or # plugins/epan/foo ) +# Do not fail CMake stage if any of the optional plugins are missing from source tree +set(_OPTIONAL_CUSTOM_PLUGIN_SRC_DIR + plugins/epan/bar +) + +foreach( _plugin_dir ${_OPTIONAL_CUSTOM_PLUGIN_SRC_DIR} ) + if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_plugin_dir}/CMakeLists.txt ) + list( APPEND CUSTOM_PLUGIN_SRC_DIR ${_plugin_dir} ) + else() + message( WARNING "Custom plugins: No ${_plugin_dir}/CMakeLists.txt file found - ignoring" ) + endif() +endforeach() + # # Editor modelines - http://www.wireshark.org/tools/modelines.html # |