Revert "sq h2"
[metze/wireshark/wip.git] / CMakeListsCustom.txt.example
index 32c62c2dead635133e3ac65bed231f9fa51aae20..abbf603ea6eff3799de7058d5174548b75e21337 100644 (file)
@@ -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
 #