|
@@ -1,33 +1,41 @@
|
1
|
|
-# Add SDL2 Library
|
2
|
|
-find_package (SDL2)
|
3
|
|
-include_directories (SYSTEM ${SDL2_INCLUDE_DIR})
|
4
|
|
-set (LIBS ${LIBS} ${SDL2_LIBRARY})
|
5
|
|
-
|
6
|
|
-# Add SDL2_ttf Library
|
7
|
|
-find_package (SDL2TTF)
|
8
|
|
-include_directories (SYSTEM ${SDL2TTF_INCLUDE_DIR})
|
9
|
|
-set (LIBS ${LIBS} ${SDL2TTF_LIBRARY})
|
10
|
|
-
|
11
|
1
|
# Add OpenGL Library
|
12
|
2
|
find_package (OpenGL REQUIRED)
|
13
|
3
|
include_directories (SYSTEM ${OPENGL_INCLUDE_DIRS})
|
14
|
4
|
set (LIBS ${LIBS} ${OPENGL_LIBRARIES})
|
15
|
5
|
|
16
|
|
-# Add OpenAL Library
|
17
|
|
-find_package (OpenAL)
|
18
|
|
-include_directories (SYSTEM ${OPENAL_INCLUDE_DIRS})
|
19
|
|
-set (LIBS ${LIBS} ${OPENAL_LIBRARIES})
|
20
|
|
-
|
21
|
|
-# Add ALUT Library
|
22
|
|
-find_package (ALUT)
|
23
|
|
-include_directories (SYSTEM ${ALUT_INCLUDE_DIRS})
|
24
|
|
-set (LIBS ${LIBS} ${ALUT_LIBRARIES})
|
25
|
|
-
|
26
|
6
|
# Add Z Library
|
27
|
7
|
find_package (ZLIB REQUIRED)
|
28
|
8
|
include_directories (SYSTEM ${ZLIB_INCLUDE_DIRS})
|
29
|
9
|
set (LIBS ${LIBS} ${ZLIB_LIBRARIES})
|
30
|
10
|
|
|
11
|
+# Add SDL2 Library
|
|
12
|
+find_package (SDL2)
|
|
13
|
+if (SDL2_FOUND)
|
|
14
|
+ include_directories (SYSTEM ${SDL2_INCLUDE_DIR})
|
|
15
|
+ set (LIBS ${LIBS} ${SDL2_LIBRARY})
|
|
16
|
+
|
|
17
|
+ # Add SDL2_ttf Library
|
|
18
|
+ find_package (SDL2TTF)
|
|
19
|
+ if (SDL2TTF_FOUND)
|
|
20
|
+ include_directories (SYSTEM ${SDL2TTF_INCLUDE_DIR})
|
|
21
|
+ set (LIBS ${LIBS} ${SDL2TTF_LIBRARY})
|
|
22
|
+ endif (SDL2TTF_FOUND)
|
|
23
|
+endif (SDL2_FOUND)
|
|
24
|
+
|
|
25
|
+# Add OpenAL Library
|
|
26
|
+find_package (OpenAL)
|
|
27
|
+if (OPENAL_FOUND)
|
|
28
|
+ include_directories (SYSTEM ${OPENAL_INCLUDE_DIRS})
|
|
29
|
+ set (LIBS ${LIBS} ${OPENAL_LIBRARIES})
|
|
30
|
+
|
|
31
|
+ # Add ALUT Library
|
|
32
|
+ find_package (ALUT)
|
|
33
|
+ if (ALUT_FOUND)
|
|
34
|
+ include_directories (SYSTEM ${ALUT_INCLUDE_DIRS})
|
|
35
|
+ set (LIBS ${LIBS} ${ALUT_LIBRARIES})
|
|
36
|
+ endif (ALUT_FOUND)
|
|
37
|
+endif (OPENAL_FOUND)
|
|
38
|
+
|
31
|
39
|
#################################################################
|
32
|
40
|
|
33
|
41
|
# Set Source files
|
|
@@ -51,6 +59,7 @@ set (SRCS ${SRCS} "World.cpp")
|
51
|
59
|
# Select available Sound library
|
52
|
60
|
if (OPENAL_FOUND AND ALUT_FOUND)
|
53
|
61
|
set (SRCS ${SRCS} "SoundAL.cpp")
|
|
62
|
+ set (OpenRaider_CXX_FLAGS "${OpenRaider_CXX_FLAGS} -DUSING_AL")
|
54
|
63
|
else (OPENAL_FOUND AND ALUT_FOUND)
|
55
|
64
|
# Currently only OpenAL support
|
56
|
65
|
message (FATAL_ERROR "OpenAL and ALUT are required!")
|
|
@@ -59,6 +68,7 @@ endif (OPENAL_FOUND AND ALUT_FOUND)
|
59
|
68
|
# Select available Windowing library
|
60
|
69
|
if (SDL2_FOUND AND SDL2TTF_FOUND)
|
61
|
70
|
set (SRCS ${SRCS} "WindowSDL.cpp")
|
|
71
|
+ set (OpenRaider_CXX_FLAGS "${OpenRaider_CXX_FLAGS} -DUSING_SDL")
|
62
|
72
|
else (SDL2_FOUND AND SDL2TTF_FOUND)
|
63
|
73
|
# Currently only SDL2 support
|
64
|
74
|
message (FATAL_ERROR "SDL2 and SDL2-TTF are required!")
|