mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-08 07:02:25 +02:00
bubble up sub dependencies to link_hifi_library
This commit is contained in:
parent
6191db3a7f
commit
9a50532b1f
4 changed files with 13 additions and 10 deletions
|
@ -16,7 +16,7 @@ macro(LINK_HIFI_LIBRARY LIBRARY TARGET ROOT_DIR)
|
|||
include_directories("${ROOT_DIR}/libraries/${LIBRARY}/src")
|
||||
|
||||
add_dependencies(${TARGET} ${LIBRARY})
|
||||
target_link_libraries(${TARGET} ${LIBRARY})
|
||||
target_link_libraries(${TARGET} ${LIBRARY} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
||||
|
||||
if (APPLE)
|
||||
# currently the "shared" library requires CoreServices
|
||||
|
|
|
@ -126,7 +126,6 @@ find_package(LeapMotion)
|
|||
find_package(ZLIB)
|
||||
find_package(Qxmpp)
|
||||
find_package(RtMidi)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
# perform standard include and linking for found externals
|
||||
foreach(EXTERNAL ${OPTIONAL_EXTERNALS})
|
||||
|
@ -180,14 +179,9 @@ endif ()
|
|||
# include headers for interface and InterfaceConfig.
|
||||
include_directories("${PROJECT_SOURCE_DIR}/src" "${PROJECT_BINARY_DIR}/includes")
|
||||
|
||||
# include external library headers
|
||||
# use system flag so warnings are supressed
|
||||
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
|
||||
|
||||
target_link_libraries(
|
||||
${TARGET_NAME}
|
||||
"${ZLIB_LIBRARIES}"
|
||||
${OPENSSL_LIBRARIES}
|
||||
Qt5::Core Qt5::Gui Qt5::Multimedia Qt5::Network Qt5::OpenGL
|
||||
Qt5::Script Qt5::Svg Qt5::WebKit Qt5::WebKitWidgets Qt5::Xml Qt5::UiTools
|
||||
)
|
||||
|
|
|
@ -20,9 +20,15 @@ link_hifi_library(networking ${TARGET_NAME} "${ROOT_DIR}")
|
|||
|
||||
# link ZLIB
|
||||
find_package(ZLIB)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
|
||||
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
|
||||
target_link_libraries(${TARGET_NAME} "${ZLIB_LIBRARIES}" Qt5::Widgets)
|
||||
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}" "${OPENSSL_INCLUDE_DIR}")
|
||||
|
||||
# bubble up the libraries we are dependent on
|
||||
set(REQUIRED_DEPENDENCY_LIBRARIES ${REQUIRED_DEPENDENCY_LIBRARIES}
|
||||
"${ZLIB_LIBRARIES}" "${OPENSSL_LIBRARIES}" Qt5::Widgets PARENT_SCOPE)
|
||||
|
||||
target_link_libraries(${TARGET_NAME} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
||||
|
||||
# add a definition for ssize_t so that windows doesn't bail
|
||||
if (WIN32)
|
||||
|
|
|
@ -30,4 +30,7 @@ endif (UNIX AND NOT APPLE)
|
|||
# directory when Qt5 (5.2.1) is compiled from source and is not in a standard place.
|
||||
include_directories(SYSTEM "${Qt5Script_INCLUDE_DIRS}")
|
||||
|
||||
target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets)
|
||||
# bubble up the libraries we are dependent on and link them to ourselves
|
||||
set(REQUIRED_DEPENDENCY_LIBRARIES Qt5::Network Qt5::Widgets)
|
||||
set(SUB_DEPENDENCY_LIBRARIES ${REQUIRED_DEPENDENCY_LIBRARIES} PARENT_SCOPE)
|
||||
target_link_libraries(${TARGET_NAME} ${REQUIRED_DEPENDENCY_LIBRARIES})
|
Loading…
Reference in a new issue