-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (49 loc) · 1.5 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.0)
project(r-type_client)
set(CMAKE_CXX_STANDARD 17)
include(cmake/conan.cmake)
run_conan()
link_directories(${CONAN_LIB_DIRS})
link_libraries(${CONAN_LIBS})
include_directories(SYSTEM "${CONAN_INCLUDE_DIRS}")
if (WIN32)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR} COMMAND copy /y ${PROJECT_BINARY_DIR}/conan/bin/*.dll ${PROJECT_BINARY_DIR})
endif()
file(GLOB CLIENT src/client/*.cpp )
file(GLOB UTILS src/utils/*.cpp)
add_executable(r-type_client
src/ecs/EntityManager.cpp
src/ecs/SystemManager.cpp
src/ecs/ComponentManager.cpp
src/ecs/Coordinator.cpp
${CLIENT}
${UTILS})
set(BUILD_SHARED_LIBS FALSE)
project(r-type_server)
add_executable(r-type_server
src/ecs/EntityManager.cpp
src/ecs/SystemManager.cpp
src/ecs/ComponentManager.cpp
src/ecs/Coordinator.cpp
src/ecs_entities/Enemy.cpp
src/network/Network.cpp
src/network/Protocol.cpp
src/network/main_network.cpp
src/server/Server.cpp
${UTILS})
include_directories(inc)
project(r-type_tests)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/refs/tags/release-1.12.1.zip
)
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
add_executable(runTests
tests/tests.cpp
tests/ecs/test_ecs.cpp
)
include_directories(src)
target_link_libraries(runTests gtest_main)