diff options
author | Joerg Mayer <jmayer@loplof.de> | 2014-09-18 08:05:48 +0200 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2014-09-18 07:02:00 +0000 |
commit | 3b46e6eaf61a29f9bd8f8c162caa54cc2ea81fe2 (patch) | |
tree | 529bfa2bd7e8a0da4b95b392efa9c8a834e04789 /CMakeLists.txt | |
parent | 84629f43cb6c19ca2e0e512ac2429584925be896 (diff) |
Having CmakeListsCustom.txt in git defeats the purpose of its existence:
If it is used, there is a modified file in git.
Fix this by only including the file if it exists.
Other changes:
- Rename the existing Custom files to CMakeListsCustom.txt.example.
- Move the plugins custom file to the top level (same level as its
including parent).
- Optionally allow a list of custom includes instead of the default one.
Change-Id: I8960eac6222f741c045055d43d1d5a2d4979caf6
Reviewed-on: https://code.wireshark.org/review/4163
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d546a05b07..712d895866 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,9 @@ cmake_policy(SET CMP0015 NEW) #Where to find local cmake scripts set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) +include(UseCustomIncludes) +ADD_CUSTOM_CMAKE_INCLUDE() + # This cannot be implemented via option(...) if( NOT CMAKE_BUILD_TYPE ) set( CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING @@ -772,7 +775,6 @@ ADD_CUSTOM_COMMAND( ) if(ENABLE_PLUGINS) - include(plugins/CMakeListsCustom.txt) set(HAVE_PLUGINS 1) set(PLUGIN_DIR "${DATAFILE_DIR}/plugins/${CPACK_PACKAGE_VERSION}") set(PLUGIN_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/@CPACK_PACKAGE_NAME@/plugins/${CPACK_PACKAGE_VERSION}") |