From e4d01d269c9d53739a0b315ce78adcaba15e1ffb Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 8 Aug 2014 11:51:12 -0700 Subject: [PATCH] use shared dependency linking macro in hifi projects --- domain-server/CMakeLists.txt | 9 +++++---- interface/CMakeLists.txt | 3 +++ tests/audio/CMakeLists.txt | 5 ++++- tests/jitter/CMakeLists.txt | 5 ++++- tests/metavoxels/CMakeLists.txt | 8 +++----- tests/networking/CMakeLists.txt | 2 ++ tests/octree/CMakeLists.txt | 5 ++--- tests/physics/CMakeLists.txt | 2 ++ tests/shared/CMakeLists.txt | 3 +++ tools/bitstream2json/CMakeLists.txt | 5 ++++- tools/mtc/CMakeLists.txt | 5 ++++- voxel-edit/CMakeLists.txt | 5 ++++- 12 files changed, 40 insertions(+), 17 deletions(-) diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index 3c1d34ba01..99e57cb0e6 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -1,6 +1,7 @@ set(TARGET_NAME domain-server) -setup_hifi_project(${TARGET_NAME}) +# setup the project and link required Qt modules +setup_hifi_project(${TARGET_NAME} Network) # remove and then copy the files for the webserver add_custom_command(TARGET ${TARGET_NAME} POST_BUILD @@ -11,8 +12,8 @@ add_custom_command(TARGET ${TARGET_NAME} POST_BUILD "${PROJECT_SOURCE_DIR}/resources/web" $/resources/web) -# link the shared hifi library +# link the shared hifi libraries link_hifi_libraries(${TARGET_NAME} embedded-webserver networking shared) -find_package(Qt5 COMPONENTS Network Widgets) -target_link_libraries(${TARGET_NAME} Qt5::Network) +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index ea4b54257b..a2770943a7 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -209,3 +209,6 @@ else (APPLE) target_link_libraries(${TARGET_NAME} "${GLEW_LIBRARIES}" wsock32.lib opengl32.lib) endif() endif (APPLE) + +# link any dependencies bubbled up from our linked dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) diff --git a/tests/audio/CMakeLists.txt b/tests/audio/CMakeLists.txt index f5d9388508..973726852d 100644 --- a/tests/audio/CMakeLists.txt +++ b/tests/audio/CMakeLists.txt @@ -6,4 +6,7 @@ setup_hifi_project(${TARGET_NAME}) include_glm(${TARGET_NAME} ${ROOT_DIR}) # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared audio networking) \ No newline at end of file +link_hifi_libraries(${TARGET_NAME} shared audio networking) + +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tests/jitter/CMakeLists.txt b/tests/jitter/CMakeLists.txt index 9c861eac3e..577591227f 100644 --- a/tests/jitter/CMakeLists.txt +++ b/tests/jitter/CMakeLists.txt @@ -3,4 +3,7 @@ set(TARGET_NAME jitter-tests) setup_hifi_project(${TARGET_NAME}) # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared networking) \ No newline at end of file +link_hifi_libraries(${TARGET_NAME} shared networking) + +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tests/metavoxels/CMakeLists.txt b/tests/metavoxels/CMakeLists.txt index 358a959eb0..6432b9a259 100644 --- a/tests/metavoxels/CMakeLists.txt +++ b/tests/metavoxels/CMakeLists.txt @@ -1,13 +1,11 @@ set(TARGET_NAME metavoxel-tests) -find_package(Qt5 COMPONENTS Network Script Widgets) - auto_mtc(${TARGET_NAME} "${ROOT_DIR}") -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project(${TARGET_NAME} Network Script Widgets) # link in the shared libraries link_hifi_libraries(${TARGET_NAME} metavoxels networking shared) -target_link_libraries(${TARGET_NAME} Qt5::Network Qt5::Widgets Qt5::Script) - +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tests/networking/CMakeLists.txt b/tests/networking/CMakeLists.txt index 68de37a1d2..214b66fd1f 100644 --- a/tests/networking/CMakeLists.txt +++ b/tests/networking/CMakeLists.txt @@ -5,3 +5,5 @@ setup_hifi_project(${TARGET_NAME}) # link in the shared libraries link_hifi_libraries(${TARGET_NAME} shared networking) +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tests/octree/CMakeLists.txt b/tests/octree/CMakeLists.txt index a8e27e0084..e9a06bd1c1 100644 --- a/tests/octree/CMakeLists.txt +++ b/tests/octree/CMakeLists.txt @@ -5,6 +5,5 @@ setup_hifi_project(${TARGET_NAME}) # link in the shared libraries link_hifi_libraries(${TARGET_NAME} octree) -IF (WIN32) - target_link_libraries(${TARGET_NAME} wsock32.lib) -ENDIF(WIN32) +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tests/physics/CMakeLists.txt b/tests/physics/CMakeLists.txt index 01bdf5a96b..74049b158b 100644 --- a/tests/physics/CMakeLists.txt +++ b/tests/physics/CMakeLists.txt @@ -5,3 +5,5 @@ setup_hifi_project(${TARGET_NAME}) # link in the shared libraries link_hifi_libraries(${TARGET_NAME} shared) +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tests/shared/CMakeLists.txt b/tests/shared/CMakeLists.txt index 828559936b..294a60d130 100644 --- a/tests/shared/CMakeLists.txt +++ b/tests/shared/CMakeLists.txt @@ -4,3 +4,6 @@ setup_hifi_project(${TARGET_NAME}) # link in the shared libraries link_hifi_libraries(${TARGET_NAME} shared) + +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tools/bitstream2json/CMakeLists.txt b/tools/bitstream2json/CMakeLists.txt index a5077dc181..884f9f9c2c 100644 --- a/tools/bitstream2json/CMakeLists.txt +++ b/tools/bitstream2json/CMakeLists.txt @@ -1,2 +1,5 @@ set(TARGET_NAME bitstream2json) -setup_hifi_project(${TARGET_NAME}) \ No newline at end of file +setup_hifi_project(${TARGET_NAME}) + +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/tools/mtc/CMakeLists.txt b/tools/mtc/CMakeLists.txt index 0b1c438393..dc30da8098 100644 --- a/tools/mtc/CMakeLists.txt +++ b/tools/mtc/CMakeLists.txt @@ -1,2 +1,5 @@ set(TARGET_NAME mtc) -setup_hifi_project(${TARGET_NAME}) \ No newline at end of file +setup_hifi_project(${TARGET_NAME}) + +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file diff --git a/voxel-edit/CMakeLists.txt b/voxel-edit/CMakeLists.txt index 5fa4061117..f9f8ed185b 100644 --- a/voxel-edit/CMakeLists.txt +++ b/voxel-edit/CMakeLists.txt @@ -1,3 +1,6 @@ set(TARGET_NAME voxel-edit) -setup_hifi_project(${TARGET_NAME}) \ No newline at end of file +setup_hifi_project(${TARGET_NAME}) + +# link any shared dependencies +link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file