|
1 |
| -cmake_minimum_required(VERSION 2.8) |
| 1 | +cmake_minimum_required(VERSION 3.7) |
2 | 2 |
|
3 | 3 | project(imaditor)
|
4 | 4 |
|
5 |
| -find_package(GLFW3) |
| 5 | +list(APPEND CMAKE_PREFIX_PATH "$ENV{userprofile}/.cpppm/install") |
6 | 6 |
|
7 |
| -add_subdirectory(tests) |
| 7 | +list(APPEND CMAKE_MODULE_PATH ${CMAKE_PREFIX_PATH}/cmake) |
8 | 8 |
|
9 |
| -add_library(nfd |
10 |
| - nativefiledialog/src/nfd_common.c |
11 |
| - nativefiledialog/src/nfd_win.cpp |
12 |
| - ) |
| 9 | +find_package(GLFW3) |
13 | 10 |
|
14 |
| -target_include_directories(nfd |
15 |
| - PRIVATE nativefiledialog/src/include |
16 |
| -) |
| 11 | +add_subdirectory(tests) |
17 | 12 |
|
18 | 13 | if(GLFW3_FOUND)
|
19 | 14 | find_package(OpenGL REQUIRED)
|
20 | 15 | find_package(GLM REQUIRED)
|
21 | 16 |
|
| 17 | + add_library(nfd |
| 18 | + nativefiledialog/src/nfd_common.c |
| 19 | + nativefiledialog/src/nfd_win.cpp |
| 20 | + ) |
| 21 | + |
| 22 | + target_include_directories(nfd |
| 23 | + PRIVATE nativefiledialog/src/include |
| 24 | + ) |
| 25 | + |
22 | 26 | add_library(imgui
|
23 | 27 | imgui/imgui.cpp
|
24 | 28 | imgui/imgui_draw.cpp
|
25 | 29 | imgui_impl_glfw_gl3.cpp
|
| 30 | + glad.c |
26 | 31 | )
|
27 | 32 |
|
28 | 33 | target_include_directories(imgui
|
| 34 | + PRIVATE "$ENV{userprofile}/.cpppm/install/include" |
| 35 | + PRIVATE include |
29 | 36 | PRIVATE imgui
|
30 |
| - PRIVATE ${GLFW3_INCLUDE_DIR} |
31 | 37 | )
|
32 | 38 |
|
33 | 39 | add_executable(imaditor
|
@@ -67,17 +73,16 @@ if(GLFW3_FOUND)
|
67 | 73 | )
|
68 | 74 |
|
69 | 75 | target_include_directories(imaditor
|
70 |
| - PRIVATE ${GLFW3_INCLUDE_DIR} |
71 |
| - PRIVATE ${GLM_INCLUDE_DIR} |
| 76 | + PRIVATE "$ENV{userprofile}/.cpppm/install/include" |
| 77 | + PRIVATE include |
72 | 78 | PRIVATE imgui
|
73 | 79 | PRIVATE nativefiledialog/src/include
|
74 | 80 | )
|
75 | 81 |
|
76 | 82 | target_link_libraries(imaditor
|
77 |
| - imgui nfd |
| 83 | + imgui nfd glfw |
78 | 84 | ${ZLIB_LIBRARIES}
|
79 | 85 | ${OPENGL_LIBRARIES}
|
80 |
| - ${GLFW3_LIBRARY} |
81 | 86 | )
|
82 | 87 |
|
83 | 88 | target_compile_features(imaditor
|
|
0 commit comments