-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathCMakeLists.txt
55 lines (43 loc) · 1.49 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
cmake_minimum_required(VERSION 3.10)
include(cmake/CompileFeatures.cmake)
project(hopson-arcade VERSION 2.0
DESCRIPTION "Hopson Arcade: Selection of simple arcade-y games"
LANGUAGES CXX)
#Set executable
add_executable(${PROJECT_NAME}
src/main.cpp
src/space_invaders/world.cpp
src/space_invaders/collidable.cpp
src/space_invaders/entity/projectile.cpp
src/space_invaders/entity/shield.cpp
src/space_invaders/entity/invader.cpp
src/space_invaders/entity/player.cpp
src/space_invaders/entity/explosion.cpp
src/space_invaders/entity/ufo.cpp
src/space_invaders/invader_manager.cpp
src/space_invaders/states/state_main_menu.cpp
src/space_invaders/states/state_highscores.cpp
src/space_invaders/states/state_playing.cpp
src/space_invaders/animation_renderer.cpp
src/space_invaders/starry_background.cpp
src/pong/states/state_main_menu.cpp
src/pong/states/state_lobby.cpp
src/pong/states/state_error.cpp
src/pong/pong_server.cpp
)
target_include_directories(${PROJECT_NAME} PRIVATE src/arcade)
setup_target_compile(${PROJECT_NAME})
#Subdirs
add_subdirectory(src/arcade/arcade/)
#Set module path
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
#Find libraries
find_package(Threads)
find_package(SFML REQUIRED audio network graphics window system)
#Finally
target_link_libraries(${PROJECT_NAME}
arcade
Threads::Threads
${SFML_LIBRARIES}
${SFML_DEPENDENCIES}
)