Ignore CMakeLists.custom.txt and create it if it does not exist during cmake.

develop
Ben Lubar 2018-07-18 14:00:40 -05:00
parent a779b247d4
commit 3e82bd8f35
No known key found for this signature in database
GPG Key ID: 018BAB45DB2D2B24
3 changed files with 11 additions and 3 deletions

3
.gitignore vendored

@ -57,3 +57,6 @@ tags
/build/win64/DF_PATH.txt /build/win64/DF_PATH.txt
/build/win32/DF_PATH.txt /build/win32/DF_PATH.txt
/.vs /.vs
# custom plugins
/plugins/CMakeLists.custom.txt

@ -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.

@ -178,4 +178,12 @@ if(BUILD_SKELETON)
add_subdirectory(skeleton) add_subdirectory(skeleton)
endif() 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) INCLUDE(CMakeLists.custom.txt)