-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
122 lines (106 loc) · 2.22 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
add_definitions(
-DGLEW_STATIC
-D_CRT_SECURE_NO_WARNINGS
)
set(GLFW_SOURCE
glfw/lib/enable.c
glfw/lib/fullscreen.c
glfw/lib/glext.c
glfw/lib/image.c
glfw/lib/init.c
glfw/lib/input.c
glfw/lib/joystick.c
glfw/lib/stream.c
glfw/lib/tga.c
glfw/lib/thread.c
glfw/lib/time.c
glfw/lib/window.c
)
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(GLFW_SOURCE ${GLFW_SOURCE}
glfw/lib/win32/win32_enable.c
glfw/lib/win32/win32_fullscreen.c
glfw/lib/win32/win32_glext.c
glfw/lib/win32/win32_init.c
glfw/lib/win32/win32_joystick.c
glfw/lib/win32/win32_thread.c
glfw/lib/win32/win32_time.c
glfw/lib/win32/win32_window.c
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(GLFW_SOURCE ${GLFW_SOURCE}
glfw/lib/x11/x11_enable.c
glfw/lib/x11/x11_fullscreen.c
glfw/lib/x11/x11_glext.c
glfw/lib/x11/x11_init.c
glfw/lib/x11/x11_joystick.c
glfw/lib/x11/x11_keysym2unicode.c
glfw/lib/x11/x11_thread.c
glfw/lib/x11/x11_time.c
glfw/lib/x11/x11_window.c
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(GLFW_SOURCE ${GLFW_SOURCE}
glfw/lib/cocoa/cocoa_enable.c
glfw/lib/cocoa/cocoa_fullscreen.c
glfw/lib/cocoa/cocoa_glext.c
glfw/lib/cocoa/cocoa_init.c
glfw/lib/cocoa/cocoa_joystick.c
glfw/lib/cocoa/cocoa_thread.c
glfw/lib/cocoa/cocoa_time.c
glfw/lib/cocoa/cocoa_window.c
)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(GLFW_HEADERS
glfw/lib/win32/platform.h
glfw/lib/internal.h
)
include_directories(
glfw/lib/win32/
glfw/lib/
glfw/include/
glew/include/
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(GLFW_HEADERS
glfw/lib/x11/platform.h
glfw/lib/internal.h
)
include_directories(
glfw/lib/x11/
glfw/lib/
glfw/include/
glew/include/
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(GLFW_HEADERS
glfw/lib/cocoa/platform.h
glfw/lib/internal.h
)
include_directories(
glfw/lib/cocoa/
glfw/lib/
glfw/include/
glew/include/
)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_library( GLFW STATIC
${GLFW_SOURCE}
${GLFW_HEADERS}
)
target_link_libraries(GLFW
${OPENGL_LIBRARY}
)
set(GLEW_SOURCE
glew/src/glew.c
)
set(GLEW_HEADERS
)
add_library( GLEW STATIC
${GLEW_SOURCE}
${GLEW_INCLUDE}
)
target_link_libraries(GLEW
${OPENGL_LIBRARY}
)