-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
47 lines (36 loc) · 997 Bytes
/
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
cmake_minimum_required(VERSION 3.11)
set(CMAKE_C_STANDARD 11)
add_compile_options(
"-Wall"
"$<$<CONFIG:RELEASE>:-O3>"
"$<$<CONFIG:DEBUG>:-DENABLE_OPENGL_DEBUG -g>"
)
project(Physarum)
SET(Physarum_SRC
src/deps/glad/glad.c
src/deps/stb/stb_image.c
src/gl_error_handeling.c
src/main.c
src/shader_program.c
src/shader.c
src/stopwatch.c
src/text_renderer.c
src/texture.c
)
SET(Physarum_INCLUDE_DIRS
include/
include/deps/
include/deps/glad/
)
find_package(SDL2 REQUIRED SDL2)
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
include_directories(${Physarum_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRs})
add_executable(Physarum_Executable ${Physarum_SRC})
if(OpenGL_FOUND)
target_link_libraries(Physarum_Executable ${OPENGL_LIBRARIES})
endif(OpenGL_FOUND)
if (SDL2_FOUND)
target_link_libraries(Physarum_Executable SDL2::SDL2)
endif (SDL2_FOUND)
target_link_libraries(Physarum_Executable m)