forked from FppEpitech/R-Type
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (27 loc) · 1.02 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cmake_minimum_required(VERSION 3.5)
find_program(CLANG_TIDY_EXE NAMES clang-tidy)
if(CLANG_TIDY_EXE AND "$ENV{LINTER}" STREQUAL "on")
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-checks=-*,modernize-*") #;-warnings-as-errors=*
endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Project name
project(R-Type)
# Set a directory path in a CMake variable
set(GAME_DIR "${CMAKE_SOURCE_DIR}/Game")
# Define a preprocessor macro globally for all targets
add_compile_definitions(GAME_ROOT="${GAME_DIR}")
# Option to build tests
option(BUILD_TESTS "Build the tests" ON)
# Add subdirectories for different components of the project
add_subdirectory(Network) # ABI Network
add_subdirectory(GraphicLibrary) # Graphic Library
add_subdirectory(Engine) # Engine
if (QUENTIN_THE_FARMER_GAME)
add_subdirectory(QuentinTheFarmerGame) # QuentinTheFarmer Game
else()
add_subdirectory(R-TypeGame) # R-Type Game
endif()
# Add subdirectory for tests if the option is enabled
if(BUILD_TESTS)
add_subdirectory(tests)
endif()