diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f033e5184..fb54bcbd8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,8 +44,10 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) +set(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}") set(HIFI_LIBRARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/libraries") set(MACRO_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros") + # setup for find modules set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index 628e473853..fd11be5122 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -5,7 +5,10 @@ setup_hifi_project(${TARGET_NAME} TRUE) include_glm(${TARGET_NAME}) # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} audio avatars octree voxels fbx particles models metavoxels networking animation script-engine embedded-webserver) +link_hifi_libraries(${TARGET_NAME} + audio avatars octree voxels fbx particles models metavoxels + networking animation shared script-engine embedded-webserver +) if (UNIX) target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES} ${CMAKE_DL_LIBS}) diff --git a/cmake/macros/AutoMTC.cmake b/cmake/macros/AutoMTC.cmake index 6f0216de7f..0e376fc176 100644 --- a/cmake/macros/AutoMTC.cmake +++ b/cmake/macros/AutoMTC.cmake @@ -8,7 +8,7 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(AUTO_MTC TARGET ROOT_DIR) +macro(AUTO_MTC TARGET) set(AUTOMTC_SRC ${TARGET}_automtc.cpp) file(GLOB INCLUDE_FILES src/*.h) diff --git a/cmake/macros/IncludeHifiLibraryHeaders.cmake b/cmake/macros/IncludeHifiLibraryHeaders.cmake index aa7e1118c6..7ac31f5259 100644 --- a/cmake/macros/IncludeHifiLibraryHeaders.cmake +++ b/cmake/macros/IncludeHifiLibraryHeaders.cmake @@ -9,8 +9,8 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(include_hifi_library_headers LIBRARY ROOT_DIR) +macro(include_hifi_library_headers LIBRARY) - include_directories("${ROOT_DIR}/libraries/${LIBRARY}/src") + include_directories("${HIFI_LIBRARY_DIR}/libraries/${LIBRARY}/src") endmacro(include_hifi_library_headers _library _root_dir) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index ed280846fe..cb2065e256 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -1,12 +1,6 @@ -set(ROOT_DIR ..) -set(MACRO_DIR "${ROOT_DIR}/cmake/macros") - set(TARGET_NAME interface) project(${TARGET_NAME}) -# setup for find modules -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/") - # set a default root dir for each of our optional externals if it was not passed set(OPTIONAL_EXTERNALS "faceplus" "faceshift" "oculus" "priovr" "sixense" "visage" "leapmotion" "rtmidi" "qxmpp") foreach(EXTERNAL ${OPTIONAL_EXTERNALS}) @@ -38,7 +32,6 @@ elseif (WIN32) endif () # set up the external glm library -include("${MACRO_DIR}/IncludeGLM.cmake") include_glm(${TARGET_NAME} "${ROOT_DIR}") # create the InterfaceConfig.h file based on GL_HEADERS above diff --git a/libraries/metavoxels/CMakeLists.txt b/libraries/metavoxels/CMakeLists.txt index 88b74194ac..29f7f85f9c 100644 --- a/libraries/metavoxels/CMakeLists.txt +++ b/libraries/metavoxels/CMakeLists.txt @@ -5,7 +5,7 @@ auto_mtc(${TARGET_NAME} "${ROOT_DIR}") setup_hifi_library(${TARGET_NAME} "${AUTOMTC_SRC}") # link in the networking library -link_hifi_libraries(${TARGET_NAME} networking) +link_hifi_libraries(${TARGET_NAME} shared networking) include_glm(${TARGET_NAME} "${ROOT_DIR}")