diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2015-11-12 16:53:34 +0300 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2015-11-12 16:53:59 +0300 |
commit | a119be9021e6c965cc78745387cf120a3ebd42c9 (patch) | |
tree | 56768941e54745666ae92ceed449d4f31b52c437 | |
parent | 68602df6ee0cb46d949d4ddfd0c5a48620d5b933 (diff) |
Add support for setting CuraEngine version from CMake15.10
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a7486a8bf..980eaebcf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,8 @@ endif() set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +set(CURA_ENGINE_VERSION "master" CACHE STRING "Version name of Cura") + # Add a compiler flag to check the output for insane values if we are in debug mode. if(CMAKE_BUILD_TYPE MATCHES DEBUG) message("Building debug release of CuraEngine.") @@ -79,6 +81,8 @@ protobuf_generate_cpp(engine_PB_SRCS engine_PB_HEADERS Cura.proto) add_executable(CuraEngine ${engine_SRCS} src/main.cpp ${engine_PB_SRCS}) target_link_libraries(CuraEngine clipper Arcus) +set_target_properties(CuraEngine PROPERTIES COMPILE_DEFINITIONS "VERSION=\"${CURA_ENGINE_VERSION}\"") + if (UNIX) target_link_libraries(CuraEngine pthread) endif() |