-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
70 lines (63 loc) · 1.78 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
cmake_minimum_required(VERSION 3.22)
project(wip C)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(CMAKE_C_STANDARD 23)
add_subdirectory(src/lib/glfw)
add_executable(wip main.c src/lib/glad/glad.c src/lib/glad/glad.h src/lib/glad/khrplatform.h
src/app.h
src/gl.h
src/err.h
src/app.c
src/gl.c
src/arr.h
src/arr.c
src/lib/simplex/FastNoiseLite.h
src/lib/simplex/FastNoiseLite.c
src/world.h
src/world.c
src/reg.c
src/reg.h
src/body.c
src/body.h
src/body.h
src/gui.c
src/gui.h
src/text.c
src/text.h
src/stbtt_impl.c
src/box.c
src/box.h
src/stb_truetype.h
src/map.h
src/map.c
src/hash.h
src/pal.h
src/chunk.h
src/chunk.c
src/obj.h
src/obj.c
src/avg.h
src/avg.c
src/text.c
src/arena.h
src/arena.c
src/vars.c
src/ani.h
src/ani.c
)
add_compile_definitions(TRACY_ENABLE=1)
find_package(assimp CONFIG REQUIRED)
#find_package(PThreads4W REQUIRED)
#target_link_libraries(wip PRIVATE PThreads4W::PThreads4W)
target_link_libraries(wip PRIVATE glfw assimp::assimp)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
set_property(TARGET wip PROPERTY CXX_STANDARD 11)
set_target_properties(wip PROPERTIES LINK_SEARCH_START_STATIC 1)
set_target_properties(wip PROPERTIES LINK_SEARCH_END_STATIC 1)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Ofast")
find_package(Threads REQUIRED)
target_link_libraries(wip PRIVATE Threads::Threads)