From df8e51f8353b099fe1eaf42c23bc01efc45fe0be Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 13 Feb 2015 10:21:21 -0800 Subject: [PATCH] use external project glm in more targets --- assignment-client/CMakeLists.txt | 3 ++- cmake/macros/IncludeGLM.cmake | 13 ------------- gvr-interface/CMakeLists.txt | 3 ++- interface/CMakeLists.txt | 2 +- libraries/audio/CMakeLists.txt | 3 ++- 5 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 cmake/macros/IncludeGLM.cmake diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index b56eea5c90..c2203316f9 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -2,7 +2,8 @@ set(TARGET_NAME assignment-client) setup_hifi_project(Core Gui Network Script Widgets) -include_glm() +add_dependency_external_project(glm) +target_link_directories(${TARGET_NAME} PRIVATE ${GLM_INCLUDE_DIRS}) # link in the shared libraries link_hifi_libraries( diff --git a/cmake/macros/IncludeGLM.cmake b/cmake/macros/IncludeGLM.cmake deleted file mode 100644 index 3e4bf9174d..0000000000 --- a/cmake/macros/IncludeGLM.cmake +++ /dev/null @@ -1,13 +0,0 @@ -# -# IncludeGLM.cmake -# -# Copyright 2013 High Fidelity, Inc. -# -# Distributed under the Apache License, Version 2.0. -# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -# - -macro(INCLUDE_GLM) - find_package(GLM REQUIRED) - include_directories(SYSTEM "${GLM_INCLUDE_DIRS}") -endmacro(INCLUDE_GLM) \ No newline at end of file diff --git a/gvr-interface/CMakeLists.txt b/gvr-interface/CMakeLists.txt index 37ac6ec050..68eeb86791 100644 --- a/gvr-interface/CMakeLists.txt +++ b/gvr-interface/CMakeLists.txt @@ -24,7 +24,8 @@ endif () include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) -include_glm() +add_dependency_external_project(glm) +target_link_libraries(${TARGET_NAME} PRIVATE ${GLM_INCLUDE_DIRS}) link_hifi_libraries(shared networking audio-client avatars) include_dependency_includes() diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 8de425d5b0..2be9f7bee2 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -109,7 +109,7 @@ add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM}) # set up the external glm library add_dependency_external_project(glm) -target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS}) +target_include_directories(${TARGET_NAME} PRIVATE ${GLM_INCLUDE_DIRS}) # link required hifi libraries link_hifi_libraries(shared octree environment gpu model fbx metavoxels networking entities avatars diff --git a/libraries/audio/CMakeLists.txt b/libraries/audio/CMakeLists.txt index b08d9e88f4..c44198ddef 100644 --- a/libraries/audio/CMakeLists.txt +++ b/libraries/audio/CMakeLists.txt @@ -3,7 +3,8 @@ set(TARGET_NAME audio) # use setup_hifi_library macro to setup our project and link appropriate Qt modules setup_hifi_library(Network) -include_glm() +add_dependency_external_project(glm) +target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS}) link_hifi_libraries(networking shared)