From 113d43f56126602bd895f744e36a5763412494df Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Fri, 11 Dec 2020 18:41:43 -0500 Subject: [PATCH] [CMake] Add SQLITECPP_INCLUDE_SCRIPT option --- CMakeLists.txt | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f84fd6..1499165 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,24 +153,27 @@ set(SQLITECPP_DOC ) source_group(doc FILES ${SQLITECPP_DOC}) -# list of config & script files of the library -set(SQLITECPP_SCRIPT - .editorconfig - .gitbugtraq - .github/workflows/build.yml - .github/workflows/subdir_example.yml - .gitignore - .gitmodules - .travis.yml - appveyor.yml - build.bat - build.sh - cpplint.py - Doxyfile - cmake/FindSQLite3.cmake - cmake/SQLiteCppConfig.cmake.in -) -source_group(scripts FILES ${SQLITECPP_SCRIPT}) +option(SQLITECPP_INCLUDE_SCRIPT "Include config & script files." ON) +if (SQLITECPP_INCLUDE_SCRIPT) + # list of config & script files of the library + set(SQLITECPP_SCRIPT + .editorconfig + .gitbugtraq + .github/workflows/build.yml + .github/workflows/subdir_example.yml + .gitignore + .gitmodules + .travis.yml + appveyor.yml + build.bat + build.sh + cpplint.py + Doxyfile + cmake/FindSQLite3.cmake + cmake/SQLiteCppConfig.cmake.in + ) + source_group(scripts FILES ${SQLITECPP_SCRIPT}) +endif() # add sources of the wrapper as a "SQLiteCpp" static library add_library(SQLiteCpp ${SQLITECPP_SRC} ${SQLITECPP_INC} ${SQLITECPP_DOC} ${SQLITECPP_SCRIPT})