From ac552c6a2887fb48bc7b23c12deb01f8f2c01502 Mon Sep 17 00:00:00 2001
From: Vladimir Onoprienko <vonopr@yandex.ru>
Date: Mon, 18 Apr 2022 16:29:15 +0300
Subject: [PATCH] Add a config file

Provide an example of how to copy non-source files into build
directory.
---
 CMakeLists.txt                               | 4 ++++
 exple-cmake-build/config-examples/config.txt | 1 +
 2 files changed, 5 insertions(+)
 create mode 100644 exple-cmake-build/config-examples/config.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13e4a37..0d1f423 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,10 @@ target_include_directories(exple_add_numbers PRIVATE
   "${COMMON_HEADER_DIR}"
   "${GRID_HEADER_DIR}")
 
+add_custom_command(TARGET exple_add_numbers POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory
+  "${PROJECT_SOURCE_DIR}/exple-cmake-build/config-examples" "$<TARGET_FILE_DIR:exple_add_numbers>/config-examples")
+
 
 # set groups for better source representation in IDEs
 source_group("Common\\Sources" FILES "${COMMON_SOURCES}")
diff --git a/exple-cmake-build/config-examples/config.txt b/exple-cmake-build/config-examples/config.txt
new file mode 100644
index 0000000..e2842a9
--- /dev/null
+++ b/exple-cmake-build/config-examples/config.txt
@@ -0,0 +1 @@
+#This is a config file
\ No newline at end of file
-- 
GitLab