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)