forked from fogleman/Craft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (26 loc) · 765 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (26 loc) · 765 Bytes
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
cmake_minimum_required(VERSION 2.8)
project(craft)
FILE(GLOB SOURCE_FILES src/*.c)
add_executable(
craft
${SOURCE_FILES}
deps/glew/src/glew.c
deps/lodepng/lodepng.c
deps/noise/noise.c
deps/sqlite/sqlite3.c
deps/tinycthread/tinycthread.c)
add_definitions(-std=c99 -O3)
add_subdirectory(deps/glfw)
include_directories(deps/glew/include)
include_directories(deps/glfw/include)
include_directories(deps/lodepng)
include_directories(deps/noise)
include_directories(deps/sqlite)
include_directories(deps/tinycthread)
if(APPLE)
target_link_libraries(craft glfw ${GLFW_LIBRARIES})
elseif(UNIX)
target_link_libraries(craft glfw dl ${GLFW_LIBRARIES})
else()
target_link_libraries(craft glfw ws2_32.lib ${GLFW_LIBRARIES})
endif()