From 552ca5e6a94ec59663e6fb52f0dbaaec333bf9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Ortega=20Froysa?= Date: Thu, 25 Oct 2018 19:56:30 +0200 Subject: [PATCH] Add flags to build. --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a7e9a4..31f2dca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ project(TrippyCube CXX) # Binary filename set(TARGET_NAME "trippy-cube") +set(TARGET_VERSION "v2.0") # Use DEBUG by default if(NOT CMAKE_BUILD_TYPE) @@ -60,11 +61,13 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os") if(CMAKE_BUILD_TYPE STREQUAL "debug" OR CMAKE_BUILD_TYPE STREQUAL "relwithdebinfo") - add_definitions(-DDEBUG) + add_definitions("-DDEBUG") else() - add_definitions(-DNDEBUG) + add_definitions("-DNDEBUG") endif() +add_definitions("-DVERSION=\"${TARGET_VERSION}\"") + add_executable(${TARGET_NAME} ${SRCS})