Did some tweaks to the CMakeLists
This commit is contained in:
@@ -3,16 +3,21 @@
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
#################################### CMAKE #####################################
|
||||
# Set up the base CMake stuff.
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
project(Dawn VERSION 1.0)
|
||||
|
||||
# Targets
|
||||
# Set some global flags
|
||||
add_compile_definitions(
|
||||
_CRT_SECURE_NO_WARNINGS=1
|
||||
SETTING_ASSET_PREFIX="../../../assets/"
|
||||
)
|
||||
|
||||
# Which game are we building?
|
||||
if(TARGET_GAME STREQUAL poker)
|
||||
add_compile_definitions(
|
||||
SETTING_GAME_NAME="Penny's Poker"
|
||||
GAME_NAME="Penny's Poker"
|
||||
GAME_FILE="poker/game.h"
|
||||
GAME_TYPE=pokergame_t
|
||||
GAME_INIT=pokerGameInit
|
||||
@@ -22,16 +27,19 @@ if(TARGET_GAME STREQUAL poker)
|
||||
)
|
||||
endif()
|
||||
|
||||
# Shared
|
||||
# Set up the project.
|
||||
project(Dawn VERSION 1.0)
|
||||
add_executable(${PROJECT_NAME})
|
||||
|
||||
# Add libraries
|
||||
add_subdirectory(lib)
|
||||
|
||||
# Add sources
|
||||
add_subdirectory(src)
|
||||
|
||||
# Targets
|
||||
if(TARGET_GROUP STREQUAL test)
|
||||
# Are we building a game, a tool or running tests?
|
||||
if(TARGET_TYPE STREQUAL test)
|
||||
add_subdirectory(test)
|
||||
else()
|
||||
add_subdirectory(client)
|
||||
endif()
|
||||
|
||||
#################################### ASSETS ####################################
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/assets DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
Reference in New Issue
Block a user