File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change
1
+ set (EXTERNAL_NAME glm)
2
+
1
3
include (ExternalProject)
2
4
ExternalProject_Add(
3
- glm
4
- PREFIX glm
5
+ ${EXTERNAL_NAME}
6
+ PREFIX ${EXTERNAL_NAME}
5
7
URL https://github.com/g-truc/glm/archive/0.9.5.4.zip
6
8
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH =<INSTALL_DIR>
7
9
LOG_DOWNLOAD ON
8
10
)
9
- ExternalProject_Get_Property(glm install_dir)
10
11
11
- export (TARGETS glm FILE ${CMAKE_BINARY_DIR} /glm-config.cmake)
12
+ ExternalProject_Get_Property(${EXTERNAL_NAME} install_dir)
13
+
14
+ string (TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER)
15
+ set (${EXTERNAL_NAME_UPPER} _INCLUDE_DIRS ${install_dir} /include CACHE TYPE STRING )
Original file line number Diff line number Diff line change @@ -21,8 +21,5 @@ macro(ADD_DEPENDENCY_EXTERNAL_PROJECT _PROJ_NAME)
21
21
add_subdirectory (${EXTERNAL_PROJECT_DIR} /${_PROJ_NAME} ${_PROJ_BINARY_DIR} )
22
22
endif ()
23
23
24
- string (TOUPPER ${_PROJ_NAME} _PROJ_NAME_UPPER)
25
- get_target_property (${_PROJ_NAME_UPPER} _INCLUDE_DIRS ${_PROJ_NAME} INCLUDE_DIRS)
26
-
27
24
add_dependencies (${TARGET_NAME} ${_PROJ_NAME} )
28
25
endmacro ()
Original file line number Diff line number Diff line change @@ -18,9 +18,7 @@ include("${MACRO_DIR}/HifiLibrarySearchHints.cmake")
18
18
hifi_library_search_hints("glm" )
19
19
20
20
# locate header
21
- find_path (GLM_INCLUDE_DIR "glm/glm.hpp" HINTS ${GLM_SEARCH_DIRS} )
22
-
23
- set (GLM_INCLUDE_DIRS "${GLM_INCLUDE_DIR} " )
21
+ find_path (GLM_INCLUDE_DIRS "glm/glm.hpp" HINTS ${GLM_SEARCH_DIRS} )
24
22
25
23
include (FindPackageHandleStandardArgs)
26
24
find_package_handle_standard_args(GLM DEFAULT_MSG GLM_INCLUDE_DIRS)
Original file line number Diff line number Diff line change @@ -4,5 +4,9 @@ set(TARGET_NAME shared)
4
4
# TODO: there isn't really a good reason to have Script linked here - let's get what is requiring it out (RegisteredMetaTypes.cpp)
5
5
setup_hifi_library(Gui Network Script Widgets)
6
6
7
+ add_dependency_external_project(glm)
8
+ find_package (GLM REQUIRED)
9
+ target_include_directories (${TARGET_NAME} PRIVATE ${GLM_INCLUDE_DIRS} )
10
+
7
11
# call macro to include our dependency includes and bubble them up via a property on our target
8
12
include_dependency_includes()
You can’t perform that action at this time.
0 commit comments