-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
55 lines (47 loc) · 1.29 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.21)
project(Schiffbruch LANGUAGES CXX)
include(FetchContent)
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.x)
FetchContent_MakeAvailable(SFML)
add_executable(Schiffbruch WIN32
src/Action.cpp
src/Application.cpp
src/ddutil.cpp
src/Direct.cpp
src/Game.cpp
src/globals.cpp
src/main.cpp
src/Math.cpp
src/Renderer.cpp
src/Routing.cpp
src/Sound.cpp
src/World.cpp
src/Action.hpp
src/Application.hpp
src/constants.hpp
src/ddutil.h
src/Direct.hpp
src/extern.hpp
src/Game.hpp
src/headers.hpp
src/Math.hpp
src/Menu.hpp
src/Renderer.hpp
src/Routing.hpp
src/Sound.hpp
src/State.hpp
src/types.hpp
src/World.hpp
src/Schiffbruch.rc
)
target_link_libraries(Schiffbruch PRIVATE sfml-graphics sfml-audio sfml-main dxguid ddraw)
target_compile_features(Schiffbruch PRIVATE cxx_std_17)
# Copy DLLs next to the executable
if (WIN32 AND BUILD_SHARED_LIBS)
add_custom_command(TARGET Schiffbruch POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:Schiffbruch> $<TARGET_FILE_DIR:Schiffbruch> COMMAND_EXPAND_LISTS)
endif()
install(DIRECTORY bin/ DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS Schiffbruch)