Add MAJOR.MINOR.PATCH versioning to the binary.
This also modified the output format for the gamestatefile so AI's will have to be updated
This commit is contained in:
parent
ec7ed601a3
commit
fec9c8dad7
6 changed files with 43 additions and 8 deletions
|
@ -1,5 +1,11 @@
|
|||
cmake_minimum_required( VERSION 2.8.7 )
|
||||
|
||||
# Set version information
|
||||
set( TTRTS_VERSION_MAJOR 0 )
|
||||
set( TTRTS_VERSION_MINOR 0 )
|
||||
set( TTRTS_VERSION_PATCH 1 )
|
||||
set( TTRTS_VERSION_STRING "${TTRTS_VERSION_MAJOR}.${TTRTS_VERSION_MINOR}.${TTRTS_VERSION_PATCH}")
|
||||
|
||||
# Use c++1y (14)
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++1y" )
|
||||
|
||||
|
@ -9,10 +15,20 @@ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-reorder" )
|
|||
# Turn off reorder warnings as they're kind of irrelevant
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reorder" )
|
||||
|
||||
# This shouldn't be needed, but it looks like IDE's like clion can forget to set -g for Debug
|
||||
if( CMAKE_BUILD_TYPE MATCHES "Debug" )
|
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g" )
|
||||
endif()
|
||||
|
||||
# Add definitions for the version number
|
||||
add_definitions(
|
||||
-DTTRTS_VERSION_MAJOR=${TTRTS_VERSION_MAJOR}
|
||||
-DTTRTS_VERSION_MINOR=${TTRTS_VERSION_MINOR}
|
||||
-DTTRTS_VERSION_PATCH=${TTRTS_VERSION_PATCH}
|
||||
-DTTRTS_VERSION_STRING=\"${DTTRTS_VERSION_STRING}\"
|
||||
)
|
||||
|
||||
|
||||
# Subprojects
|
||||
add_subdirectory( ttrts )
|
||||
add_subdirectory( game )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue