From ed3f308a0e8a401dc670af815bfb0fdd793cf18f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 15 Apr 2013 16:08:35 -0700 Subject: [PATCH] pass ROOT_DIR to IncludeGLM macro instead of MACRO_DIR, include glm for AM --- avatar-mixer/CMakeLists.txt | 7 +++++++ cmake/macros/IncludeGLM.cmake | 6 +++--- interface/CMakeLists.txt | 2 +- libraries/avatars/CMakeLists.txt | 2 +- libraries/voxels/CMakeLists.txt | 4 +--- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/avatar-mixer/CMakeLists.txt b/avatar-mixer/CMakeLists.txt index 95cfd60a88..da25b6e981 100644 --- a/avatar-mixer/CMakeLists.txt +++ b/avatar-mixer/CMakeLists.txt @@ -5,10 +5,17 @@ set(TARGET_NAME "avatar-mixer") set(ROOT_DIR ..) set(MACRO_DIR ${ROOT_DIR}/cmake/macros) +# setup for find modules +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/") + # setup the project include(${MACRO_DIR}/SetupHifiProject.cmake) setup_hifi_project(${TARGET_NAME}) +# include glm +include(${MACRO_DIR}/IncludeGLM.cmake) +include_glm(${TARGET_NAME} ${ROOT_DIR}) + # link required hifi libraries include(${MACRO_DIR}/LinkHifiLibrary.cmake) link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) diff --git a/cmake/macros/IncludeGLM.cmake b/cmake/macros/IncludeGLM.cmake index f77ad9e06d..c5530bf8c9 100644 --- a/cmake/macros/IncludeGLM.cmake +++ b/cmake/macros/IncludeGLM.cmake @@ -1,5 +1,5 @@ -MACRO(INCLUDE_GLM TARGET MACRO_DIR) - set(GLM_ROOT_DIR ${MACRO_DIR}/../../externals) +MACRO(INCLUDE_GLM TARGET ROOT_DIR) + set(GLM_ROOT_DIR ${ROOT_DIR}/externals) find_package(GLM REQUIRED) include_directories(${GLM_INCLUDE_DIRS}) -ENDMACRO(INCLUDE_GLM _target _macro_dir) \ No newline at end of file +ENDMACRO(INCLUDE_GLM _target _root_dir) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 1dc201cfe9..de9b31c9df 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -26,7 +26,7 @@ endif (WIN32) # set up the external glm library include(${MACRO_DIR}/IncludeGLM.cmake) -include_glm(${TARGET_NAME} ${MACRO_DIR}) +include_glm(${TARGET_NAME} ${ROOT_DIR}) # create the InterfaceConfig.h file based on GL_HEADERS above configure_file(InterfaceConfig.h.in ${PROJECT_BINARY_DIR}/includes/InterfaceConfig.h) diff --git a/libraries/avatars/CMakeLists.txt b/libraries/avatars/CMakeLists.txt index 35bb4df9e9..b1c593a4a6 100644 --- a/libraries/avatars/CMakeLists.txt +++ b/libraries/avatars/CMakeLists.txt @@ -12,7 +12,7 @@ include(${MACRO_DIR}/SetupHifiLibrary.cmake) setup_hifi_library(${TARGET_NAME}) include(${MACRO_DIR}/IncludeGLM.cmake) -include_glm(${TARGET_NAME} ${MACRO_DIR}) +include_glm(${TARGET_NAME} ${ROOT_DIR}) include(${MACRO_DIR}/LinkHifiLibrary.cmake) link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) \ No newline at end of file diff --git a/libraries/voxels/CMakeLists.txt b/libraries/voxels/CMakeLists.txt index 61718c58da..d873320064 100644 --- a/libraries/voxels/CMakeLists.txt +++ b/libraries/voxels/CMakeLists.txt @@ -11,10 +11,8 @@ set(TARGET_NAME voxels) include(${MACRO_DIR}/SetupHifiLibrary.cmake) setup_hifi_library(${TARGET_NAME}) -# include glm include(${MACRO_DIR}/IncludeGLM.cmake) -include_glm(${TARGET_NAME} ${MACRO_DIR}) +include_glm(${TARGET_NAME} ${ROOT_DIR}) -# link the shared library include(${MACRO_DIR}/LinkHifiLibrary.cmake) link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) \ No newline at end of file