summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-version.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-05-16 03:29:31 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-05-16 03:29:31 +0200
commite2abcc623f2c12caee4a3e9a1f6ebb500ae81f60 (patch)
treee51d0777a65203e13e4a1cc7413741b799eb8260 /cmake/opentrack-version.cmake
parent94d831ebb2f92374acb2c6d08ce792df099ce040 (diff)
cleanup
Diffstat (limited to 'cmake/opentrack-version.cmake')
-rw-r--r--cmake/opentrack-version.cmake13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmake/opentrack-version.cmake b/cmake/opentrack-version.cmake
index 00a5df1d..181fc613 100644
--- a/cmake/opentrack-version.cmake
+++ b/cmake/opentrack-version.cmake
@@ -29,17 +29,18 @@ const char* opentrack_version;
const char* opentrack_version = \"${OPENTRACK_COMMIT}${_build_type}\";
")
+set(file "${CMAKE_CURRENT_BINARY_DIR}/version.cpp")
set(crapola-ver)
-if(EXISTS ${CMAKE_BINARY_DIR}/version.c)
- file(READ ${CMAKE_BINARY_DIR}/version.c crapola-ver)
+if(EXISTS "${file}")
+ file(READ "${file}" crapola-ver)
endif()
if(NOT (crapola-ver STREQUAL version-string))
- file(WRITE ${CMAKE_BINARY_DIR}/version.c "${version-string}")
+ file(WRITE "${file}" "${version-string}")
endif()
-add_library(opentrack-version STATIC ${CMAKE_BINARY_DIR}/version.c)
+add_library(opentrack-version STATIC "${file}")
+
if(NOT MSVC)
- set_property(TARGET opentrack-version APPEND_STRING PROPERTY COMPILE_FLAGS " -fno-lto")
+ otr_prop(TARGET opentrack-version COMPILE_FLAGS "-fno-lto")
endif()
-otr_compat(opentrack-version)