summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJF <JF002@users.noreply.github.com>2022-01-26 20:33:57 (GMT)
committerGitHub <noreply@github.com>2022-01-26 20:33:57 (GMT)
commita354650a9cf5e760c953dec153ab8a4d37266dd2 (patch)
treef4bdddc9b11257683a44ae164bfaf43069d07482
parentcc01d6ca173157c9bc871ec3e3fa9d4c9d3098d8 (diff)
parent688dc2fed7b207bdf80b5f4af5a5df8faad9f2ec (diff)
Merge pull request #944 from NeroBurner/no_generated_files_in_source_dir
Create Version.h in binary dir instead of src dir
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt2
2 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c2e0a11..8846531 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -100,7 +100,7 @@ else()
endif()
set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!")
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/Version.h.in ${CMAKE_CURRENT_BINARY_DIR}/src/Version.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/docker/post_build.sh.in ${CMAKE_CURRENT_BINARY_DIR}/post_build.sh)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 062d8a5..aec6ce0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -612,6 +612,7 @@ list(APPEND RECOVERYLOADER_SOURCE_FILES
set(INCLUDE_FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/src/Version.h
BootloaderVersion.h
logging/Logger.h
logging/NrfLogger.h
@@ -710,6 +711,7 @@ set(INCLUDE_FILES
)
include_directories(
+ ${CMAKE_BINARY_DIR}/src # include generated files like Version.h
.
../
libs/