-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
executable file
·81 lines (76 loc) · 1.57 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
cmake_minimum_required(VERSION 3.3)
set(CMAKE_CXX_STANDARD 11)
set(LIB_NAME blobcast)
project(${LIB_NAME})
option(BLOBCAST_RTMP
"Stream to a local RTMP server instead oF UDP multicast"
OFF)
include_directories(include)
if (CMAKE_COMPILER_IS_GNUCXX)
link_directories(gcc/lib)
elseif (MSVC)
set(MSVC_DIR msvc14)
link_directories(${MSVC_DIR}/lib)
endif()
if(BLOBCAST_RTMP)
add_definitions(-DRTMP_STREAM)
endif(BLOBCAST_RTMP)
file(GLOB GLB_SRC_FILES "*.c" "*.cpp" "*.h")
add_library(${LIB_NAME} STATIC ${GLB_SRC_FILES})
if (WIN32)
target_link_libraries(${LIB_NAME}
glew32
opengl32
glfw3
SOIL
${OPENGL_glu_LIBRARY}
legacy_stdio_definitions
freetype
freetype-gl
avcodec
avformat
avutil
swscale
ws2_32
optimized RakNetLibStatic debug RakNetLibStatic_Debug
optimized BulletCollision debug BulletCollision_Debug
optimized BulletDynamics debug BulletDynamics_Debug
optimized BulletSoftBody debug BulletSoftBody_Debug
optimized LinearMath debug LinearMath_Debug
optimized SPARK debug SPARK_Debug
optimized SPARK_GL debug SPARK_GL_Debug
)
else()
set(GLFW_LIBRARIES X11 Xrandr Xinerama Xcursor dl z bz2 Xxf86vm GL pthread)
set(FFMPEG_LIBRARIES
va lzma
freetype
mp3lame
opus
theora theoraenc theoradec
vorbis vorbisenc
vpx x264 x265)
target_link_libraries(${LIB_NAME}
GLEW
OpenGL
glfw3
${GLFW_LIBRARIES}
${OPENGL_glu_LIBRARY}
SOIL
freetype
freetype-gl
${FFMPEG_LIBRARIES}
avcodec
avformat
avutil
swresample
swscale
RakNetLibStatic
BulletSoftBody
BulletDynamics
BulletCollision
LinearMath
)
endif()
add_subdirectory(server)
add_subdirectory(client)