From b0ff960e37a37697d878470e185c2e243f37422a Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 12 Apr 2013 13:20:46 -0700 Subject: [PATCH] use MACRO_DIR variable to find glm in root externals dir --- cmake/macros/IncludeGLM.cmake | 6 +++--- interface/CMakeLists.txt | 5 +++-- libraries/voxels/CMakeLists.txt | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cmake/macros/IncludeGLM.cmake b/cmake/macros/IncludeGLM.cmake index 4a205df803..f77ad9e06d 100644 --- a/cmake/macros/IncludeGLM.cmake +++ b/cmake/macros/IncludeGLM.cmake @@ -1,5 +1,5 @@ -MACRO(INCLUDE_GLM TARGET) - set(GLM_ROOT_DIR ../externals) +MACRO(INCLUDE_GLM TARGET MACRO_DIR) + set(GLM_ROOT_DIR ${MACRO_DIR}/../../externals) find_package(GLM REQUIRED) include_directories(${GLM_INCLUDE_DIRS}) -ENDMACRO(INCLUDE_GLM _target) \ No newline at end of file +ENDMACRO(INCLUDE_GLM _target _macro_dir) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index c493bcbab8..d4de4397a1 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -7,8 +7,9 @@ set(LODEPNG_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/LodePNG) set(PORTAUDIO_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/portaudio) # set up the external glm library -include(../cmake/macros/IncludeGLM.cmake) -INCLUDE_GLM(interface) +set(MACRO_DIR ../cmake/macros) +include(${MACRO_DIR}/IncludeGLM.cmake) +include_glm(interface ${MACRO_DIR}) project(interface) diff --git a/libraries/voxels/CMakeLists.txt b/libraries/voxels/CMakeLists.txt index c0408b11f2..a1fe6b5922 100644 --- a/libraries/voxels/CMakeLists.txt +++ b/libraries/voxels/CMakeLists.txt @@ -11,7 +11,7 @@ project(${TARGET_NAME}) # set up the external glm library include(${MACRO_DIR}/IncludeGLM.cmake) -include_glm(${TARGET_NAME}) +include_glm(${TARGET_NAME} ${MACRO_DIR}) # grab the implemenation and header files file(GLOB HIFI_VOXELS_SRCS src/*.h src/*.cpp)