-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsnellius.patch
More file actions
37 lines (34 loc) · 967 Bytes
/
Copy pathsnellius.patch
File metadata and controls
37 lines (34 loc) · 967 Bytes
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4e287b1..f64c3ac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,24 @@ add_compile_definitions(GIT_HASH="${GIT_HASH}")
find_package(Qt5 REQUIRED COMPONENTS Widgets Charts)
find_package(Eigen3 REQUIRED)
-find_package(glm REQUIRED)
+
+find_path(GLM_INCLUDE_DIR
+ NAMES glm/glm.hpp
+ PATHS
+ ENV EBROOTGLM
+ ENV GLM_ROOT
+ PATH_SUFFIXES include
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(glm DEFAULT_MSG GLM_INCLUDE_DIR)
+
+if(glm_FOUND AND NOT TARGET glm::glm)
+ add_library(glm::glm INTERFACE IMPORTED)
+ set_target_properties(glm::glm PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${GLM_INCLUDE_DIR}"
+ )
+endif()
add_executable(atom-architect WIN32
src/main.cpp
@@ -79,4 +96,4 @@ endif()
if (WIN32)
target_sources(atom-architect PRIVATE atom-architect.rc)
-endif()
\ No newline at end of file
+endif()