From 1e38a5f1079e67da595d8226c1ba847cfcda46c9 Mon Sep 17 00:00:00 2001 From: mdiluzio Date: Sat, 10 Jan 2015 16:56:01 +0000 Subject: [PATCH] Update CMakelists to reflect refactor --- CMakeLists.txt | 23 ++++++++++++++--------- source/CMakeLists.txt | 13 +++++++++++++ 2 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 source/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 01d8a13..97a47ba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,18 @@ cmake_minimum_required( VERSION 2.8.7 ) # Set version information set( TTRTS_VERSION_MAJOR 0 ) -set( TTRTS_VERSION_MINOR 3 ) -set( TTRTS_VERSION_PATCH 2 ) +set( TTRTS_VERSION_MINOR 4 ) +set( TTRTS_VERSION_PATCH 0 ) + +# Set defaults for ttrts variables +set( TTRTS_MAPS "/usr/local/share/ttrts/maps/" ) +set( TTRTS_GAMES "/tmp/" ) +set( TTRTS_PORT 11715 ) + +# define these defaults in code +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTTRTS_MAPS=${TTRTS_MAPS}" ) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTTRTS_GAMES=${TTRTS_GAMES}" ) +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTTRTS_PORT=${TTRTS_PORT}" ) # Use c++1y (14) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++1y" ) @@ -26,7 +36,7 @@ install( FILES scripts/ttrts_complete DESTINATION /etc/bash_completion.d/ ) # Run the gen_usage script to generate our usage header add_custom_target( ttrts-gen-manpage ALL - ${CMAKE_SOURCE_DIR}/scripts/gen_manpage.sh "${TTRTS_VERSION_MAJOR}" "${TTRTS_VERSION_MINOR}" "${TTRTS_VERSION_PATCH}" "ttrts.6" "${CMAKE_SOURCE_DIR}/source/client/README.md" + ${CMAKE_SOURCE_DIR}/scripts/gen_manpage.sh "${TTRTS_VERSION_MAJOR}" "${TTRTS_VERSION_MINOR}" "${TTRTS_VERSION_PATCH}" "ttrts.6" "${CMAKE_SOURCE_DIR}/source/README.md" ) # Install the ttrts man page @@ -41,9 +51,4 @@ endif() install( FILES "${CMAKE_BINARY_DIR}/ttrts.6" DESTINATION ${MANPAGE_LOC} ) # Subprojects -add_subdirectory( source/ttrts ) -add_subdirectory( source/client ) - -# Auxhilary binaries -add_subdirectory( source/test ) -add_subdirectory( source/gen ) +add_subdirectory( source ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt new file mode 100644 index 0000000..d73e509 --- /dev/null +++ b/source/CMakeLists.txt @@ -0,0 +1,13 @@ +# Main libraries +add_subdirectory( ttrts ) +add_subdirectory( system ) + +# Main binaries +add_subdirectory( launcher ) +add_subdirectory( client ) +add_subdirectory( server ) +add_subdirectory( local ) + +# Auxhilary binaries +add_subdirectory( test ) +add_subdirectory( gen ) \ No newline at end of file