forked from azekillDIABLO/omicron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
52 lines (41 loc) · 1.29 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
cmake_minimum_required(VERSION 2.8)
project(omicron)
FILE(GLOB SOURCE_FILES src/*.c)
FILE(GLOB SOURCE_WORLDGEN_FILES src/worldgen/*.c)
add_executable(
omicron
${SOURCE_FILES}
${SOURCE_WORLDGEN_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 -Werror=implicit-function-declaration)
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(MINGW)
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH}
"C:/Program Files/CURL/lib" "C:/Program Files (x86)/CURL/lib")
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH}
"C:/Program Files/CURL/include" "C:/Program Files (x86)/CURL/include")
endif()
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIR})
if(APPLE)
target_link_libraries(omicron glfw
${GLFW_LIBRARIES} ${CURL_LIBRARIES})
endif()
if(UNIX)
target_link_libraries(omicron dl glfw
${GLFW_LIBRARIES} ${CURL_LIBRARIES})
endif()
if(MINGW)
target_link_libraries(omicron ws2_32.lib glfw
${GLFW_LIBRARIES} ${CURL_LIBRARIES})
endif()