From 3e82bd8f3509e0ca7e4c3673caf6bc3de6f2cc8a Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Wed, 18 Jul 2018 14:00:40 -0500 Subject: [PATCH] Ignore CMakeLists.custom.txt and create it if it does not exist during cmake. --- .gitignore | 3 +++ plugins/CMakeLists.custom.txt | 3 --- plugins/CMakeLists.txt | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 plugins/CMakeLists.custom.txt diff --git a/.gitignore b/.gitignore index 1c47520cd..6a447a40e 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,6 @@ tags /build/win64/DF_PATH.txt /build/win32/DF_PATH.txt /.vs + +# custom plugins +/plugins/CMakeLists.custom.txt diff --git a/plugins/CMakeLists.custom.txt b/plugins/CMakeLists.custom.txt deleted file mode 100644 index 35a9d0efc..000000000 --- a/plugins/CMakeLists.custom.txt +++ /dev/null @@ -1,3 +0,0 @@ -# You can add custom plugins here to avoid touching plugins/CMakeLists.txt, -# This can be useful if you've made modifications to that file and try to -# switch between branches that have also made modifications to it. diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index fbf458c4f..951a1d2d6 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -178,4 +178,12 @@ if(BUILD_SKELETON) add_subdirectory(skeleton) endif() +if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.custom.txt") + FILE(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.custom.txt" "# You can add custom plugins here to avoid touching plugins/CMakeLists.txt, +# This can be useful if you've made modifications to that file and try to +# switch between branches that have also made modifications to it. + +") +endif() + INCLUDE(CMakeLists.custom.txt)