summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorManuel Bentele2020-11-13 08:19:58 +0100
committerManuel Bentele2020-11-13 08:19:58 +0100
commiteec2032418e17bd318b33d7f4b9ef846aa135918 (patch)
tree9f3901992027daec1a6b5a335bc45ac84d2dc1eb /CMakeLists.txt
parentDo not print verbose CMake messages in unsupported CMake versions (diff)
downloadxloop-eec2032418e17bd318b33d7f4b9ef846aa135918.tar.gz
xloop-eec2032418e17bd318b33d7f4b9ef846aa135918.tar.xz
xloop-eec2032418e17bd318b33d7f4b9ef846aa135918.zip
[BUILD] add support to locate build directory out of Git directory
This patch adds support to locate the build directory for generated artifacts out of the original checked out Git source code repository.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 66d67a4..26e786f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,7 @@ set(INCLUDE_VERSION_HEADER ${PROJECT_INCLUDE_DIR}/xloop/version.h)
set(INCLUDE_VERSION_HEADER_TEMPLATE ${PROJECT_INCLUDE_DIR}/xloop/version.h.in)
set(INCLUDE_VERSION_HEADER_GENERATE ${PROJECT_INCLUDE_GEN_DIR}/xloop/version.h)
set(INCLUDE_VERSION_HEADER_GENERATE_PREFIX ${PROJECT_INCLUDE_DIR_PREFIX}/xloop)
-gen_project_version(${INCLUDE_VERSION_HEADER} ${INCLUDE_VERSION_HEADER_TEMPLATE} ${INCLUDE_VERSION_HEADER_GENERATE})
+gen_project_version(${INCLUDE_VERSION_HEADER} ${INCLUDE_VERSION_HEADER_TEMPLATE} ${INCLUDE_VERSION_HEADER_GENERATE} ${GIT_EXECUTABLE} ${CMAKE_SOURCE_DIR})
# generate project build type C header file from template
# exposes xloop-generate-build and xloop-build target
@@ -82,7 +82,7 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -DNDEBUG")
# define packaging if Release build is enabled
if(CMAKE_BUILD_TYPE MATCHES "Release")
# get version source package or Git repository
- get_repository_version(REPOSITORY_VERSION ${INCLUDE_VERSION_HEADER} ${CMAKE_BUILD_TYPE})
+ get_repository_version(REPOSITORY_VERSION ${INCLUDE_VERSION_HEADER} ${CMAKE_BUILD_TYPE} ${GIT_EXECUTABLE} ${CMAKE_SOURCE_DIR})
# define project version
if(KernelHeaders_VERSION)