mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-07 10:02:24 +02:00
pass a ROOT_DIR to LinkHifiLibrary
This commit is contained in:
parent
f6adac1399
commit
cc2f35ca89
9 changed files with 46 additions and 29 deletions
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(MACRO_DIR ../cmake/macros)
|
||||
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
set(TARGET_NAME audio-mixer)
|
||||
|
||||
|
@ -8,7 +10,7 @@ setup_hifi_project(${TARGET_NAME})
|
|||
|
||||
# link the shared hifi library
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME})
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link the threads library
|
||||
find_package(Threads REQUIRED)
|
||||
|
|
|
@ -2,13 +2,16 @@ cmake_minimum_required(VERSION 2.8)
|
|||
|
||||
set(TARGET_NAME "avatar-mixer")
|
||||
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
# setup the project
|
||||
include(../cmake/macros/SetupHifiProject.cmake)
|
||||
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
||||
setup_hifi_project(${TARGET_NAME})
|
||||
|
||||
# link the shared hifi library
|
||||
include(../cmake/macros/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME})
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link the threads library
|
||||
find_package(Threads REQUIRED)
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
MACRO(LINK_HIFI_LIBRARY LIBRARY TARGET)
|
||||
MACRO(LINK_HIFI_LIBRARY LIBRARY TARGET ROOT_DIR)
|
||||
if (NOT TARGET ${LIBRARY})
|
||||
add_subdirectory(../libraries/${LIBRARY} ../libraries/${LIBRARY})
|
||||
add_subdirectory(${ROOT_DIR}/libraries/${LIBRARY} ${ROOT_DIR}/libraries/${LIBRARY})
|
||||
endif (NOT TARGET ${LIBRARY})
|
||||
|
||||
string(TOUPPER ${LIBRARY} UPPERCASED_LIBRARY_NAME)
|
||||
set(HIFI_LIBRARY_PROPERTY "HIFI_${UPPERCASED_LIBRARY_NAME}_LIBRARY")
|
||||
get_directory_property(HIFI_LIBRARY
|
||||
DIRECTORY ../libraries/${LIBRARY}
|
||||
DIRECTORY ${ROOT_DIR}/libraries/${LIBRARY}
|
||||
DEFINITION ${HIFI_LIBRARY_PROPERTY})
|
||||
|
||||
include_directories(../libraries/${LIBRARY}/src)
|
||||
include_directories(${ROOT_DIR}/libraries/${LIBRARY}/src)
|
||||
|
||||
add_dependencies(${TARGET} ${LIBRARY})
|
||||
target_link_libraries(${TARGET} ${LIBRARY})
|
||||
|
@ -19,4 +19,4 @@ MACRO(LINK_HIFI_LIBRARY LIBRARY TARGET)
|
|||
# link in required OS X framework
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -framework CoreServices")
|
||||
endif (APPLE)
|
||||
ENDMACRO(LINK_HIFI_LIBRARY _library _target)
|
||||
ENDMACRO(LINK_HIFI_LIBRARY _library _target _root_dir)
|
|
@ -1,5 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
set(MACRO_DIR ../cmake/macros)
|
||||
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
set(TARGET_NAME domain-server)
|
||||
|
||||
|
@ -8,4 +10,4 @@ setup_hifi_project(${TARGET_NAME})
|
|||
|
||||
# link the shared hifi library
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME})
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
|
@ -1,16 +1,16 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(injector)
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
# grab the implemenation and header files
|
||||
file(GLOB INJECTOR_SRCS src/*.cpp src/*.h)
|
||||
set(TARGET_NAME injector)
|
||||
|
||||
# add the executable
|
||||
add_executable(injector ${INJECTOR_SRCS})
|
||||
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
||||
setup_hifi_project(${TARGET_NAME})
|
||||
|
||||
# link the shared hifi library
|
||||
include(../cmake/macros/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared injector)
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link the threads library
|
||||
find_package(Threads REQUIRED)
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
set(TARGET_NAME interface)
|
||||
project(${TARGET_NAME})
|
||||
|
||||
|
@ -22,7 +25,6 @@ if (WIN32)
|
|||
endif (WIN32)
|
||||
|
||||
# set up the external glm library
|
||||
set(MACRO_DIR ../cmake/macros)
|
||||
include(${MACRO_DIR}/IncludeGLM.cmake)
|
||||
include_glm(${TARGET_NAME} ${MACRO_DIR})
|
||||
|
||||
|
@ -54,10 +56,10 @@ add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS})
|
|||
|
||||
# link in the hifi shared library
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME})
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link in the hifi voxels library
|
||||
link_hifi_library(voxels ${TARGET_NAME})
|
||||
link_hifi_library(voxels ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# find required libraries
|
||||
find_package(GLM REQUIRED)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(MACRO_DIR ../../cmake/macros)
|
||||
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/")
|
||||
|
@ -18,5 +19,8 @@ file(GLOB HIFI_VOXELS_SRCS src/*.h src/*.cpp)
|
|||
|
||||
# create a library and set the property so it can be referenced later
|
||||
add_library(${TARGET_NAME} ${HIFI_VOXELS_SRCS})
|
||||
include_directories(${TARGET_NAME} ../shared/src)
|
||||
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
set(HIFI_VOXELS_LIBRARY ${TARGET_NAME})
|
|
@ -1,11 +1,13 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
set(TARGET_NAME space-server)
|
||||
|
||||
set(MACRO_DIR ../cmake/macros)
|
||||
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
||||
|
||||
setup_hifi_project(${TARGET_NAME})
|
||||
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME})
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
|
@ -2,14 +2,16 @@ cmake_minimum_required(VERSION 2.8)
|
|||
|
||||
set(TARGET_NAME voxel-server)
|
||||
|
||||
set(MACRO_DIR ../cmake/macros)
|
||||
set(ROOT_DIR ../)
|
||||
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
||||
|
||||
setup_hifi_project(${TARGET_NAME})
|
||||
|
||||
# link in the shared library
|
||||
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
||||
link_hifi_library(shared ${TARGET_NAME})
|
||||
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR})
|
||||
|
||||
# link in the hifi voxels library
|
||||
link_hifi_library(voxels ${TARGET_NAME})
|
||||
link_hifi_library(voxels ${TARGET_NAME} ${ROOT_DIR})
|
Loading…
Reference in a new issue