summaryrefslogtreecommitdiffstats
path: root/cmake/modules/UseCustomIncludes.cmake
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 20:34:10 +0000
commite4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch)
tree68cb5ef9081156392f1dd62a00c6ccc1451b93df /cmake/modules/UseCustomIncludes.cmake
parentInitial commit. (diff)
downloadwireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz
wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cmake/modules/UseCustomIncludes.cmake')
-rw-r--r--cmake/modules/UseCustomIncludes.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/modules/UseCustomIncludes.cmake b/cmake/modules/UseCustomIncludes.cmake
new file mode 100644
index 0000000..be01303
--- /dev/null
+++ b/cmake/modules/UseCustomIncludes.cmake
@@ -0,0 +1,18 @@
+#
+# - Include a custom CMake file relative to the current source directory.
+# - If no filename is provided, CMakeListsCustom.txt is used.
+#
+macro( ADD_CUSTOM_CMAKE_INCLUDE )
+ if( ${ARGN} )
+ set( _file_list ${ARGN} )
+ else()
+ set( _file_list CMakeListsCustom.txt )
+ endif()
+ foreach (_include ${_file_list})
+ set( _include_file ${CMAKE_CURRENT_SOURCE_DIR}/${_include} )
+ if( EXISTS ${_include_file} )
+ message ( STATUS "Custom file found, including: ${_include_file}" )
+ include( ${_include_file} )
+ endif()
+ endforeach()
+endmacro()