mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 12:12:32 +02:00
allow a target to bubble up required includes
This commit is contained in:
parent
bff6707715
commit
b8d0bd5d6b
4 changed files with 19 additions and 2 deletions
|
@ -29,6 +29,10 @@ macro(LINK_HIFI_LIBRARIES)
|
||||||
get_target_property(LINKED_TARGET_DEPENDENCY_LIBRARIES ${HIFI_LIBRARY} DEPENDENCY_LIBRARIES)
|
get_target_property(LINKED_TARGET_DEPENDENCY_LIBRARIES ${HIFI_LIBRARY} DEPENDENCY_LIBRARIES)
|
||||||
list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK ${LINKED_TARGET_DEPENDENCY_LIBRARIES})
|
list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK ${LINKED_TARGET_DEPENDENCY_LIBRARIES})
|
||||||
|
|
||||||
|
# ask the library what its include dependencies are and link them
|
||||||
|
get_target_property(LINKED_TARGET_DEPENDENCY_INCLUDES ${HIFI_LIBRARY} DEPENDENCY_INCLUDES)
|
||||||
|
list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES ${LINKED_TARGET_DEPENDENCY_INCLUDES})
|
||||||
|
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
endmacro(LINK_HIFI_LIBRARIES)
|
endmacro(LINK_HIFI_LIBRARIES)
|
|
@ -17,9 +17,17 @@ macro(LINK_SHARED_DEPENDENCIES)
|
||||||
target_link_libraries(${TARGET_NAME} ${${TARGET_NAME}_LIBRARIES_TO_LINK})
|
target_link_libraries(${TARGET_NAME} ${${TARGET_NAME}_LIBRARIES_TO_LINK})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (${TARGET_NAME}_DEPENDENCY_INCLUDES)
|
||||||
|
list(REMOVE_DUPLICATES ${TARGET_NAME}_DEPENDENCY_INCLUDES)
|
||||||
|
|
||||||
|
# include those in our own target
|
||||||
|
include_directories(SYSTEM ${${TARGET_NAME}_DEPENDENCY_INCLUDES})
|
||||||
|
endif ()
|
||||||
|
|
||||||
# we've already linked our Qt modules, but we need to bubble them up to parents
|
# we've already linked our Qt modules, but we need to bubble them up to parents
|
||||||
list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${${TARGET}_QT_MODULES_TO_LINK}")
|
list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${${TARGET}_QT_MODULES_TO_LINK}")
|
||||||
|
|
||||||
# set the property on this target so it can be retreived by targets linking to us
|
# set the property on this target so it can be retreived by targets linking to us
|
||||||
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES "${${TARGET}_LIBRARIES_TO_LINK}")
|
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES "${${TARGET_NAME}_LIBRARIES_TO_LINK}")
|
||||||
|
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_INCLUDES "${${TARGET_NAME}_DEPENDENCY_INCLUDES}")
|
||||||
endmacro(LINK_SHARED_DEPENDENCIES)
|
endmacro(LINK_SHARED_DEPENDENCIES)
|
|
@ -22,10 +22,13 @@ if (APPLE AND ${OPENSSL_INCLUDE_DIR} STREQUAL "/usr/include")
|
||||||
"\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.")
|
"\nWe recommend you install a newer version (at least 1.0.1h) in a different directory and set OPENSSL_ROOT_DIR in your env so Cmake can find it.")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}" "${LIBCUCKOO_INCLUDE_DIRS}")
|
include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
|
||||||
|
|
||||||
# append OpenSSL to our list of libraries to link
|
# append OpenSSL to our list of libraries to link
|
||||||
list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${OPENSSL_LIBRARIES}")
|
list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${OPENSSL_LIBRARIES}")
|
||||||
|
|
||||||
|
# append libcuckoo includes to our list of includes to bubble
|
||||||
|
list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${LIBCUCKOO_INCLUDE_DIRS}")
|
||||||
|
|
||||||
# call macro to link our dependencies and bubble them up via a property on our target
|
# call macro to link our dependencies and bubble them up via a property on our target
|
||||||
link_shared_dependencies()
|
link_shared_dependencies()
|
|
@ -28,6 +28,8 @@
|
||||||
#include <QtNetwork/QHostAddress>
|
#include <QtNetwork/QHostAddress>
|
||||||
#include <QtNetwork/QUdpSocket>
|
#include <QtNetwork/QUdpSocket>
|
||||||
|
|
||||||
|
#include <libcuckoo/cuckoohash_map.hh>
|
||||||
|
|
||||||
#include "DomainHandler.h"
|
#include "DomainHandler.h"
|
||||||
#include "Node.h"
|
#include "Node.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue