mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 19:23:28 +02:00
fix requirement of networking in audio library
This commit is contained in:
parent
fa26957b23
commit
b5c8a4d2c6
9 changed files with 47 additions and 36 deletions
|
@ -17,5 +17,12 @@ macro(LINK_HIFI_LIBRARY LIBRARY TARGET ROOT_DIR)
|
|||
|
||||
add_dependencies(${TARGET} ${LIBRARY})
|
||||
|
||||
target_link_libraries(${TARGET} ${LIBRARY} ${SUB_DEPENDENCY_LIBRARIES})
|
||||
get_target_property(LINKED_TARGET_DEPENDENCY_LIBRARIES ${LIBRARY} DEPENDENCY_LIBRARIES)
|
||||
|
||||
if (LINKED_TARGET_DEPENDENCY_LIBRARIES)
|
||||
target_link_libraries(${TARGET} ${LIBRARY} ${LINKED_TARGET_DEPENDENCY_LIBRARIES})
|
||||
else ()
|
||||
target_link_libraries(${TARGET} ${LIBRARY})
|
||||
endif ()
|
||||
|
||||
endmacro(LINK_HIFI_LIBRARY _library _target _root_dir)
|
|
@ -6,8 +6,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cm
|
|||
|
||||
set(TARGET_NAME animation)
|
||||
|
||||
find_package(Qt5 COMPONENTS Script)
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
||||
setup_hifi_library(${TARGET_NAME})
|
||||
|
||||
|
@ -15,7 +13,12 @@ include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
|||
link_hifi_library(shared ${TARGET_NAME} "${ROOT_DIR}")
|
||||
link_hifi_library(fbx ${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Script)
|
||||
find_package(Qt5Script)
|
||||
|
||||
# set a property indicating the libraries we are dependent on and link them to ourselves
|
||||
set(DEPENDENCY_LIBRARIES Qt5::Script)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES "${DEPENDENCY_LIBRARIES}")
|
||||
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES})
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
|
|
|
@ -20,6 +20,13 @@ include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
|||
link_hifi_library(shared ${TARGET_NAME} "${ROOT_DIR}")
|
||||
link_hifi_library(networking ${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
find_package(Qt5Network)
|
||||
|
||||
# set a property indicating the libraries we are dependent on and link them to ourselves
|
||||
set(DEPENDENCY_LIBRARIES Qt5::Network)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES ${DEPENDENCY_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES})
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
add_definitions(-Dssize_t=long)
|
||||
|
|
|
@ -11,7 +11,7 @@ setup_hifi_library(${TARGET_NAME})
|
|||
|
||||
find_package(Qt5Network REQUIRED)
|
||||
|
||||
# bubble up the libraries we are dependent on and link them to ourselves
|
||||
set(REQUIRED_DEPENDENCY_LIBRARIES Qt5::Network)
|
||||
set(SUB_DEPENDENCY_LIBRARIES ${REQUIRED_DEPENDENCY_LIBRARIES} PARENT_SCOPE)
|
||||
target_link_libraries(${TARGET_NAME} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
||||
# set a property indicating the libraries we are dependent on and link them to ourselves
|
||||
set(DEPENDENCY_LIBRARIES Qt5::Network)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES ${DEPENDENCY_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES})
|
|
@ -22,7 +22,11 @@ link_hifi_library(voxels ${TARGET_NAME} "${ROOT_DIR}")
|
|||
find_package(ZLIB)
|
||||
|
||||
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
|
||||
target_link_libraries(${TARGET_NAME} "${ZLIB_LIBRARIES}" Qt5::Widgets)
|
||||
|
||||
# bubble up the libraries we are dependent on and link them to ourselves
|
||||
set(REQUIRED_DEPENDENCY_LIBRARIES "${ZLIB_LIBRARIES}")
|
||||
set(SUB_DEPENDENCY_LIBRARIES ${REQUIRED_DEPENDENCY_LIBRARIES} PARENT_SCOPE)
|
||||
target_link_libraries(${TARGET_NAME} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
|
|
|
@ -6,8 +6,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../../cm
|
|||
|
||||
set(TARGET_NAME metavoxels)
|
||||
|
||||
find_package(Qt5 COMPONENTS Network Script Widgets)
|
||||
|
||||
include(${MACRO_DIR}/AutoMTC.cmake)
|
||||
auto_mtc(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
|
@ -21,7 +19,13 @@ link_hifi_library(networking ${TARGET_NAME} "${ROOT_DIR}")
|
|||
include(${MACRO_DIR}/IncludeGLM.cmake)
|
||||
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets Qt5::Script)
|
||||
find_package(Qt5Script)
|
||||
find_package(Qt5Widgets)
|
||||
|
||||
# set a property indicating the libraries we are dependent on and link them to ourselves
|
||||
set(DEPENDENCY_LIBRARIES Qt5::Script Qt5::Widgets)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES "${DEPENDENCY_LIBRARIES}")
|
||||
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES})
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
|
|
|
@ -8,11 +8,8 @@ set(TARGET_NAME models)
|
|||
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
|
||||
include(${MACRO_DIR}/AutoMTC.cmake)
|
||||
auto_mtc(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
||||
setup_hifi_library(${TARGET_NAME} "${AUTOMTC_SRC}")
|
||||
setup_hifi_library(${TARGET_NAME})
|
||||
|
||||
include(${MACRO_DIR}/IncludeGLM.cmake)
|
||||
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
@ -27,12 +24,6 @@ link_hifi_library(animation ${TARGET_NAME} "${ROOT_DIR}")
|
|||
# for streamable
|
||||
link_hifi_library(metavoxels ${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
# link ZLIB
|
||||
find_package(ZLIB)
|
||||
|
||||
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
|
||||
target_link_libraries(${TARGET_NAME} "${ZLIB_LIBRARIES}" Qt5::Widgets)
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
add_definitions(-Dssize_t=long)
|
||||
|
|
|
@ -2,21 +2,16 @@ set(ROOT_DIR ../..)
|
|||
set(MACRO_DIR "${ROOT_DIR}/cmake/macros")
|
||||
|
||||
set(TARGET_NAME networking)
|
||||
project(${TARGET_NAME})
|
||||
|
||||
include(${MACRO_DIR}/SetupHifiLibrary.cmake)
|
||||
setup_hifi_library(${TARGET_NAME})
|
||||
|
||||
# include GLM
|
||||
include(${MACRO_DIR}/IncludeGLM.cmake)
|
||||
include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
find_package(Qt5Network)
|
||||
|
||||
# bubble up the libraries we are dependent on and link them to ourselves
|
||||
set(REQUIRED_DEPENDENCY_LIBRARIES Qt5::Network)
|
||||
set(SUB_DEPENDENCY_LIBRARIES ${REQUIRED_DEPENDENCY_LIBRARIES} PARENT_SCOPE)
|
||||
target_link_libraries(${TARGET_NAME} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
||||
# set a property indicating the libraries we are dependent on and link them to ourselves
|
||||
set(DEPENDENCY_LIBRARIES Qt5::Network)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES "${DEPENDENCY_LIBRARIES}")
|
||||
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES})
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
|
|
|
@ -14,16 +14,16 @@ include_glm(${TARGET_NAME} "${ROOT_DIR}")
|
|||
# link required libraries on UNIX
|
||||
if (APPLE)
|
||||
find_library(CoreServices CoreServices)
|
||||
list(APPEND REQUIRED_DEPENDENCY_LIBRARIES ${CoreServices})
|
||||
set(DEPENDENCY_LIBRARIES ${CoreServices})
|
||||
elseif (UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
LIST(APPEND REQUIRED_DEPENDENCY_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
set(DEPENDENCY_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
|
||||
endif ()
|
||||
|
||||
find_package(Qt5Network)
|
||||
find_package(Qt5Widgets)
|
||||
|
||||
# bubble up the libraries we are dependent on and link them to ourselves
|
||||
list(APPEND REQUIRED_DEPENDENCY_LIBRARIES Qt5::Network Qt5::Widgets)
|
||||
set(SUB_DEPENDENCY_LIBRARIES ${REQUIRED_DEPENDENCY_LIBRARIES} PARENT_SCOPE)
|
||||
target_link_libraries(${TARGET_NAME} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
||||
list(APPEND DEPENDENCY_LIBRARIES Qt5::Network Qt5::Widgets)
|
||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES ${DEPENDENCY_LIBRARIES})
|
||||
target_link_libraries(${TARGET_NAME} ${DEPENDENCY_LIBRARIES})
|
Loading…
Reference in a new issue