-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (39 loc) · 1.37 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
cmake_minimum_required(VERSION 3.5.0)
project(airfoil-generator)
set(SRC_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/src"
)
set(INCLUDE_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR}/include"
)
set(SOURCES
"${SRC_DIR}/main.cpp"
"${SRC_DIR}/airfoil.cpp"
"${SRC_DIR}/drawer.cpp"
"${INCLUDE_DIRECTORIES}/glad/glad.c"
)
add_executable(${PROJECT_NAME} ${SOURCES})
add_library(imgui STATIC
${INCLUDE_DIRECTORIES}/imgui/imgui.cpp
${INCLUDE_DIRECTORIES}/imgui/imgui_draw.cpp
${INCLUDE_DIRECTORIES}/imgui/imgui_demo.cpp
${INCLUDE_DIRECTORIES}/imgui/imgui_tables.cpp
${INCLUDE_DIRECTORIES}/imgui/imgui_widgets.cpp
)
target_include_directories(imgui PUBLIC ${INCLUDE_DIRECTORIES}/imgui)
add_library(imgui_backend STATIC
${INCLUDE_DIRECTORIES}/imgui/backends/imgui_impl_glfw.cpp
${INCLUDE_DIRECTORIES}/imgui/backends/imgui_impl_opengl3.cpp
)
target_include_directories(imgui_backend PUBLIC
${INCLUDE_DIRECTORIES}/imgui
${INCLUDE_DIRECTORIES}/imgui/backends
)
find_package(OpenGL REQUIRED)
find_package(glfw3 REQUIRED)
find_package(glm CONFIG REQUIRED)
find_package(GLEW REQUIRED)
find_package(GLU REQUIRED)
target_link_libraries(imgui_backend imgui glfw OpenGL::GL)
target_link_libraries(${PROJECT_NAME} imgui_backend GLU imgui glfw OpenGL::GL m GLEW::GLEW)
target_include_directories(${PROJECT_NAME} PRIVATE ${INCLUDE_DIRECTORIES} GLU glm::glm GLEW::GLEW)