-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
107 lines (96 loc) · 2.71 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
cmake_minimum_required (VERSION 3.0.0)
project(onslaught)
include(GNUInstallDirs)
include_directories(include)
set(EXECUTABLE_OUTPUT_PATH .)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 11)
add_definitions(-DNONS_SVN)
add_definitions(-DBUILD_ONSLAUGHT -DHAVE_INTTYPES_H -DSDL_HAS_64BIT_TYPE -w -fno-exceptions)
set(LIBS
${LIBS}
SDL_image
SDL
bz2
freetype
FLAC
vorbisfile
vorbis
ogg
jpeg
png
tiff
mikmod
openal
mpg123
dl
z
pthread
)
add_executable(ONSlaught
src/Archive.cpp
src/Audio.cpp
src/AudioFormats.cpp
src/ErrorCodes.cpp
src/ExpressionParser.tab.cpp
src/FileLog.cpp
src/Functions.cpp
src/GFX.cpp
src/GUI.cpp
src/Image.cpp
src/INIfile.cpp
src/INIParser.tab.cpp
src/IOFunctions.cpp
src/libFLAC++/metadata.cpp
src/libFLAC++/stream_decoder.cpp
src/libFLAC++/stream_encoder.cpp
src/libtimidity/common.c
src/libtimidity/instrum.c
src/libtimidity/instrum_dls.c
src/libtimidity/mix.c
src/libtimidity/output.c
src/libtimidity/playmidi.c
src/libtimidity/readmidi.c
src/libtimidity/resample.c
src/libtimidity/stream.c
src/libtimidity/tables.c
src/libtimidity/timidity.c
src/LZMA.c
src/ONSlaught.cpp
src/OpenAL.cpp
src/Options.cpp
src/Plugin/LibraryLoader.cpp
src/ScreenSpace.cpp
src/Script.cpp
src/ScriptInterpreter.cpp
src/sha1.cpp
src/SJIS.table.cpp
src/Thread.cpp
src/ThreadManager.cpp
src/tinyxml/tinyxml.cpp
src/tinyxml/tinyxmlerror.cpp
src/tinyxml/tinyxmlparser.cpp
src/VariableStore.cpp
src/VirtualScreen.cpp
)
if(UNIX)
add_definitions(-DREAD_LINKING_WARNING)
add_library(plugin SHARED src/Plugin/Plugin.cpp)
add_subdirectory(svg_loader)
add_subdirectory(video_player/FFmpeg)
# FUCK YOU VLC!
endif()
target_link_libraries(ONSlaught ${LIBS})
install(TARGETS ONSlaught
DESTINATION ${CMAKE_INSTALL_DATADIR}/ONSlaught
)
if(UNIX)
install(TARGETS plugin
DESTINATION ${CMAKE_INSTALL_DATADIR}/ONSlaught
)
configure_file("Launcher.sh.in" "Launcher.sh" @ONLY)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Launcher.sh
DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME ONSlaught
)
endif()