From b1310c065ce7e37d1c61026e53614b99207d6311 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 8 Aug 2014 12:55:06 -0700 Subject: [PATCH] remove TARGET_NAME from cmake macros where it is not required --- assignment-client/CMakeLists.txt | 8 ++++---- cmake/macros/AutoMTC.cmake | 4 ++-- cmake/macros/IncludeGLM.cmake | 4 ++-- cmake/macros/LinkHifiLibraries.cmake | 10 +++++----- ...ToTarget.cmake => LinkSharedDependencies.cmake} | 14 +++++++------- cmake/macros/SetupHifiLibrary.cmake | 12 ++++++------ cmake/macros/SetupHifiProject.cmake | 10 +++++----- domain-server/CMakeLists.txt | 6 +++--- interface/CMakeLists.txt | 6 +++--- libraries/animation/CMakeLists.txt | 6 +++--- libraries/audio/CMakeLists.txt | 8 ++++---- libraries/avatars/CMakeLists.txt | 8 ++++---- libraries/embedded-webserver/CMakeLists.txt | 4 ++-- libraries/fbx/CMakeLists.txt | 8 ++++---- libraries/metavoxels/CMakeLists.txt | 10 +++++----- libraries/models/CMakeLists.txt | 8 ++++---- libraries/networking/CMakeLists.txt | 6 +++--- libraries/octree/CMakeLists.txt | 8 ++++---- libraries/particles/CMakeLists.txt | 8 ++++---- libraries/script-engine/CMakeLists.txt | 8 ++++---- libraries/shared/CMakeLists.txt | 4 ++-- libraries/voxels/CMakeLists.txt | 8 ++++---- tests/audio/CMakeLists.txt | 9 ++++----- tests/jitter/CMakeLists.txt | 6 +++--- tests/metavoxels/CMakeLists.txt | 10 +++++----- tests/networking/CMakeLists.txt | 6 +++--- tests/octree/CMakeLists.txt | 8 ++++---- tests/physics/CMakeLists.txt | 8 ++++---- tests/shared/CMakeLists.txt | 8 ++++---- tools/bitstream2json/CMakeLists.txt | 4 ++-- tools/json2bitstream/CMakeLists.txt | 4 ++-- tools/mtc/CMakeLists.txt | 4 ++-- voxel-edit/CMakeLists.txt | 4 ++-- 33 files changed, 119 insertions(+), 120 deletions(-) rename cmake/macros/{LinkSharedDependenciesToTarget.cmake => LinkSharedDependencies.cmake} (61%) diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index 9f8542c42e..972c6ac220 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME assignment-client) -setup_hifi_project(${TARGET_NAME} Core Gui Network Script Widgets) +setup_hifi_project(Core Gui Network Script Widgets) -include_glm(${TARGET_NAME}) +include_glm() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} +link_hifi_libraries( audio avatars octree voxels fbx particles models metavoxels networking animation shared script-engine embedded-webserver ) @@ -14,4 +14,4 @@ if (UNIX) list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK ${CMAKE_DL_LIBS}) endif (UNIX) -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/cmake/macros/AutoMTC.cmake b/cmake/macros/AutoMTC.cmake index 0e376fc176..4d433e7b69 100644 --- a/cmake/macros/AutoMTC.cmake +++ b/cmake/macros/AutoMTC.cmake @@ -8,8 +8,8 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(AUTO_MTC TARGET) - set(AUTOMTC_SRC ${TARGET}_automtc.cpp) +macro(AUTO_MTC) + set(AUTOMTC_SRC ${TARGET_NAME}_automtc.cpp) file(GLOB INCLUDE_FILES src/*.h) diff --git a/cmake/macros/IncludeGLM.cmake b/cmake/macros/IncludeGLM.cmake index ec7816770f..e2fa981a3b 100644 --- a/cmake/macros/IncludeGLM.cmake +++ b/cmake/macros/IncludeGLM.cmake @@ -7,7 +7,7 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(INCLUDE_GLM TARGET) +macro(INCLUDE_GLM) find_package(GLM REQUIRED) include_directories("${GLM_INCLUDE_DIRS}") @@ -16,4 +16,4 @@ macro(INCLUDE_GLM TARGET) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${GLM_INCLUDE_DIRS}") endif () -endmacro(INCLUDE_GLM _target) \ No newline at end of file +endmacro(INCLUDE_GLM) \ No newline at end of file diff --git a/cmake/macros/LinkHifiLibraries.cmake b/cmake/macros/LinkHifiLibraries.cmake index 00020cc059..9d73963fea 100644 --- a/cmake/macros/LinkHifiLibraries.cmake +++ b/cmake/macros/LinkHifiLibraries.cmake @@ -7,7 +7,7 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(LINK_HIFI_LIBRARIES TARGET) +macro(LINK_HIFI_LIBRARIES) file(RELATIVE_PATH RELATIVE_LIBRARY_DIR_PATH ${CMAKE_CURRENT_SOURCE_DIR} "${HIFI_LIBRARY_DIR}") @@ -20,15 +20,15 @@ macro(LINK_HIFI_LIBRARIES TARGET) include_directories("${HIFI_LIBRARY_DIR}/${HIFI_LIBRARY}/src") - add_dependencies(${TARGET} ${HIFI_LIBRARY}) + add_dependencies(${TARGET_NAME} ${HIFI_LIBRARY}) # link the actual library - it is static so don't bubble it up - target_link_libraries(${TARGET} ${HIFI_LIBRARY}) + target_link_libraries(${TARGET_NAME} ${HIFI_LIBRARY}) # ask the library what its dynamic dependencies are and link them get_target_property(LINKED_TARGET_DEPENDENCY_LIBRARIES ${HIFI_LIBRARY} DEPENDENCY_LIBRARIES) - list(APPEND ${TARGET}_LIBRARIES_TO_LINK ${LINKED_TARGET_DEPENDENCY_LIBRARIES}) + list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK ${LINKED_TARGET_DEPENDENCY_LIBRARIES}) endforeach() -endmacro(LINK_HIFI_LIBRARIES _target _libraries) \ No newline at end of file +endmacro(LINK_HIFI_LIBRARIES) \ No newline at end of file diff --git a/cmake/macros/LinkSharedDependenciesToTarget.cmake b/cmake/macros/LinkSharedDependencies.cmake similarity index 61% rename from cmake/macros/LinkSharedDependenciesToTarget.cmake rename to cmake/macros/LinkSharedDependencies.cmake index 42f7109807..ae478ca530 100644 --- a/cmake/macros/LinkSharedDependenciesToTarget.cmake +++ b/cmake/macros/LinkSharedDependencies.cmake @@ -1,5 +1,5 @@ # -# LinkHifiLibrary.cmake +# LinkSharedDependencies.cmake # cmake/macros # # Copyright 2014 High Fidelity, Inc. @@ -9,17 +9,17 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(LINK_SHARED_DEPENDENCIES_TO_TARGET TARGET) - if (${TARGET}_LIBRARIES_TO_LINK) - list(REMOVE_DUPLICATES ${TARGET}_LIBRARIES_TO_LINK) +macro(LINK_SHARED_DEPENDENCIES) + if (${TARGET_NAME}_LIBRARIES_TO_LINK) + list(REMOVE_DUPLICATES ${TARGET_NAME}_LIBRARIES_TO_LINK) # link these libraries to our target - target_link_libraries(${TARGET} ${${TARGET}_LIBRARIES_TO_LINK}) + target_link_libraries(${TARGET_NAME} ${${TARGET_NAME}_LIBRARIES_TO_LINK}) endif () # we've already linked our Qt modules, but we need to bubble them up to parents - list(APPEND ${TARGET}_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_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_LIBRARIES "${${TARGET}_LIBRARIES_TO_LINK}") -endmacro(LINK_SHARED_DEPENDENCIES_TO_TARGET _target) \ No newline at end of file +endmacro(LINK_SHARED_DEPENDENCIES) \ No newline at end of file diff --git a/cmake/macros/SetupHifiLibrary.cmake b/cmake/macros/SetupHifiLibrary.cmake index 73ee208b98..3c2590d38d 100644 --- a/cmake/macros/SetupHifiLibrary.cmake +++ b/cmake/macros/SetupHifiLibrary.cmake @@ -7,16 +7,16 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(SETUP_HIFI_LIBRARY TARGET) +macro(SETUP_HIFI_LIBRARY) - project(${TARGET}) + project(${TARGET_NAME}) # grab the implemenation and header files file(GLOB LIB_SRCS src/*.h src/*.cpp) set(LIB_SRCS ${LIB_SRCS}) # create a library and set the property so it can be referenced later - add_library(${TARGET} ${LIB_SRCS} ${AUTOMTC_SRC}) + add_library(${TARGET_NAME} ${LIB_SRCS} ${AUTOMTC_SRC}) set(QT_MODULES_TO_LINK ${ARGN}) list(APPEND QT_MODULES_TO_LINK Core) @@ -27,7 +27,7 @@ macro(SETUP_HIFI_LIBRARY TARGET) get_target_property(QT_LIBRARY_LOCATION Qt5::${QT_MODULE} LOCATION) # add the actual path to the Qt module to our LIBRARIES_TO_LINK variable - target_link_libraries(${TARGET} Qt5::${QT_MODULE}) - list(APPEND ${TARGET}_QT_MODULES_TO_LINK ${QT_LIBRARY_LOCATION}) + target_link_libraries(${TARGET_NAME} Qt5::${QT_MODULE}) + list(APPEND ${TARGET_NAME}_QT_MODULES_TO_LINK ${QT_LIBRARY_LOCATION}) endforeach() -endmacro(SETUP_HIFI_LIBRARY _target) \ No newline at end of file +endmacro(SETUP_HIFI_LIBRARY) \ No newline at end of file diff --git a/cmake/macros/SetupHifiProject.cmake b/cmake/macros/SetupHifiProject.cmake index c680790f02..62c215e595 100644 --- a/cmake/macros/SetupHifiProject.cmake +++ b/cmake/macros/SetupHifiProject.cmake @@ -7,8 +7,8 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(SETUP_HIFI_PROJECT TARGET) - project(${TARGET}) +macro(SETUP_HIFI_PROJECT) + project(${TARGET_NAME}) # grab the implemenation and header files file(GLOB TARGET_SRCS src/*) @@ -23,7 +23,7 @@ macro(SETUP_HIFI_PROJECT TARGET) endforeach() # add the executable, include additional optional sources - add_executable(${TARGET} ${TARGET_SRCS} "${AUTOMTC_SRC}") + add_executable(${TARGET_NAME} ${TARGET_SRCS} "${AUTOMTC_SRC}") set(QT_MODULES_TO_LINK ${ARGN}) list(APPEND QT_MODULES_TO_LINK Core) @@ -31,11 +31,11 @@ macro(SETUP_HIFI_PROJECT TARGET) find_package(Qt5 COMPONENTS ${QT_MODULES_TO_LINK}) foreach(QT_MODULE ${QT_MODULES_TO_LINK}) - target_link_libraries(${TARGET} Qt5::${QT_MODULE}) + target_link_libraries(${TARGET_NAME} Qt5::${QT_MODULE}) # add the actual path to the Qt module to our LIBRARIES_TO_LINK variable get_target_property(QT_LIBRARY_LOCATION Qt5::${QT_MODULE} LOCATION) - list(APPEND ${TARGET}_QT_MODULES_TO_LINK ${QT_LIBRARY_LOCATION}) + list(APPEND ${TARGET_NAME}_QT_MODULES_TO_LINK ${QT_LIBRARY_LOCATION}) endforeach() endmacro() \ No newline at end of file diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index 99e57cb0e6..bc9269b9ce 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME domain-server) # setup the project and link required Qt modules -setup_hifi_project(${TARGET_NAME} Network) +setup_hifi_project(Network) # remove and then copy the files for the webserver add_custom_command(TARGET ${TARGET_NAME} POST_BUILD @@ -13,7 +13,7 @@ add_custom_command(TARGET ${TARGET_NAME} POST_BUILD $/resources/web) # link the shared hifi libraries -link_hifi_libraries(${TARGET_NAME} embedded-webserver networking shared) +link_hifi_libraries(embedded-webserver networking shared) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index a2770943a7..d58bea6f9e 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -32,7 +32,7 @@ elseif (WIN32) endif () # set up the external glm library -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() # create the InterfaceConfig.h file based on GL_HEADERS above configure_file(InterfaceConfig.h.in "${PROJECT_BINARY_DIR}/includes/InterfaceConfig.h") @@ -91,7 +91,7 @@ endif() add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM}) # link required hifi libraries -link_hifi_libraries(${TARGET_NAME} shared octree voxels fbx metavoxels networking particles models avatars audio animation script-engine) +link_hifi_libraries(shared octree voxels fbx metavoxels networking particles models avatars audio animation script-engine) # find any optional and required libraries find_package(Faceplus) @@ -211,4 +211,4 @@ else (APPLE) endif (APPLE) # link any dependencies bubbled up from our linked dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) +link_shared_dependencies() diff --git a/libraries/animation/CMakeLists.txt b/libraries/animation/CMakeLists.txt index 19fa087092..3f65c1ab6c 100644 --- a/libraries/animation/CMakeLists.txt +++ b/libraries/animation/CMakeLists.txt @@ -1,9 +1,9 @@ set(TARGET_NAME animation) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network Script) +setup_hifi_library(Network Script) -link_hifi_libraries(${TARGET_NAME} shared fbx) +link_hifi_libraries(shared fbx) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/audio/CMakeLists.txt b/libraries/audio/CMakeLists.txt index 8487f48ad3..6ade1fc423 100644 --- a/libraries/audio/CMakeLists.txt +++ b/libraries/audio/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME audio) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network) +setup_hifi_library(Network) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} networking shared) +link_hifi_libraries(networking shared) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/avatars/CMakeLists.txt b/libraries/avatars/CMakeLists.txt index 2791589abb..1d287ee7a2 100644 --- a/libraries/avatars/CMakeLists.txt +++ b/libraries/avatars/CMakeLists.txt @@ -1,12 +1,12 @@ set(TARGET_NAME avatars) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network Script) +setup_hifi_library(Network Script) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} shared octree voxels networking) +link_hifi_libraries(shared octree voxels networking) include_hifi_library_headers(fbx) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/embedded-webserver/CMakeLists.txt b/libraries/embedded-webserver/CMakeLists.txt index b397003133..6e4b92e217 100644 --- a/libraries/embedded-webserver/CMakeLists.txt +++ b/libraries/embedded-webserver/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME embedded-webserver) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network) +setup_hifi_library(Network) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/fbx/CMakeLists.txt b/libraries/fbx/CMakeLists.txt index d02cc918fc..3cc510aed9 100644 --- a/libraries/fbx/CMakeLists.txt +++ b/libraries/fbx/CMakeLists.txt @@ -1,15 +1,15 @@ set(TARGET_NAME fbx) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME}) +setup_hifi_library() -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm("${ROOT_DIR}") -link_hifi_libraries(${TARGET_NAME} shared networking octree voxels) +link_hifi_libraries(shared networking octree voxels) find_package(ZLIB) include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}") list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${ZLIB_LIBRARIES}") # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) +link_shared_dependencies() diff --git a/libraries/metavoxels/CMakeLists.txt b/libraries/metavoxels/CMakeLists.txt index b9a03bf0f4..aab8d2184d 100644 --- a/libraries/metavoxels/CMakeLists.txt +++ b/libraries/metavoxels/CMakeLists.txt @@ -1,14 +1,14 @@ set(TARGET_NAME metavoxels) -auto_mtc(${TARGET_NAME} "${ROOT_DIR}") +auto_mtc() # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network Script Widgets) +setup_hifi_library(Network Script Widgets) # link in the networking library -link_hifi_libraries(${TARGET_NAME} shared networking) +link_hifi_libraries(shared networking) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/models/CMakeLists.txt b/libraries/models/CMakeLists.txt index 89178f193a..858d01efa1 100644 --- a/libraries/models/CMakeLists.txt +++ b/libraries/models/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME models) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network Script) +setup_hifi_library(Network Script) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} shared octree fbx networking animation) +link_hifi_libraries(shared octree fbx networking animation) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/networking/CMakeLists.txt b/libraries/networking/CMakeLists.txt index c2b86e2218..3191cfe67b 100644 --- a/libraries/networking/CMakeLists.txt +++ b/libraries/networking/CMakeLists.txt @@ -1,9 +1,9 @@ set(TARGET_NAME networking) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network) +setup_hifi_library(Network) -link_hifi_libraries(${TARGET_NAME} shared) +link_hifi_libraries(shared) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/octree/CMakeLists.txt b/libraries/octree/CMakeLists.txt index 1fa730aad7..193b058466 100644 --- a/libraries/octree/CMakeLists.txt +++ b/libraries/octree/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME octree) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME}) +setup_hifi_library() -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} shared networking) +link_hifi_libraries(shared networking) # find ZLIB and OpenSSL find_package(ZLIB) @@ -18,4 +18,4 @@ list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${ZLIB_LIBRARIES}") list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${OPENSSL_LIBRARIES}") # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/particles/CMakeLists.txt b/libraries/particles/CMakeLists.txt index f306c0a749..27fc816530 100644 --- a/libraries/particles/CMakeLists.txt +++ b/libraries/particles/CMakeLists.txt @@ -1,12 +1,12 @@ set(TARGET_NAME particles) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Gui Network Script) +setup_hifi_library(Gui Network Script) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} shared octree fbx networking animation) +link_hifi_libraries(shared octree fbx networking animation) include_hifi_library_headers(script-engine) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/script-engine/CMakeLists.txt b/libraries/script-engine/CMakeLists.txt index a16d6270c9..dd28e77b7e 100644 --- a/libraries/script-engine/CMakeLists.txt +++ b/libraries/script-engine/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME script-engine) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Gui Network Script Widgets) +setup_hifi_library(Gui Network Script Widgets) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} shared octree voxels fbx particles models animation) +link_hifi_libraries(shared octree voxels fbx particles models animation) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/shared/CMakeLists.txt b/libraries/shared/CMakeLists.txt index 1a6b39ea59..17ccbdc6ce 100644 --- a/libraries/shared/CMakeLists.txt +++ b/libraries/shared/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME shared) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Network Widgets) +setup_hifi_library(Network Widgets) # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/libraries/voxels/CMakeLists.txt b/libraries/voxels/CMakeLists.txt index 87841ca29f..d9d8717fba 100644 --- a/libraries/voxels/CMakeLists.txt +++ b/libraries/voxels/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME voxels) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(${TARGET_NAME} Widgets Script) +setup_hifi_library(Widgets Script) -include_glm(${TARGET_NAME} "${ROOT_DIR}") +include_glm() -link_hifi_libraries(${TARGET_NAME} shared octree networking) +link_hifi_libraries(shared octree networking) # find ZLIB find_package(ZLIB) @@ -15,4 +15,4 @@ include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}") list(APPEND ${TARGET}_LIBRARIES_TO_LINK "${ZLIB_LIBRARIES}") # call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/audio/CMakeLists.txt b/tests/audio/CMakeLists.txt index 973726852d..3ef87ede28 100644 --- a/tests/audio/CMakeLists.txt +++ b/tests/audio/CMakeLists.txt @@ -1,12 +1,11 @@ set(TARGET_NAME audio-tests) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() -#include glm -include_glm(${TARGET_NAME} ${ROOT_DIR}) +include_glm() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared audio networking) +link_hifi_libraries(shared audio networking) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/jitter/CMakeLists.txt b/tests/jitter/CMakeLists.txt index 577591227f..28a312540f 100644 --- a/tests/jitter/CMakeLists.txt +++ b/tests/jitter/CMakeLists.txt @@ -1,9 +1,9 @@ set(TARGET_NAME jitter-tests) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared networking) +link_hifi_libraries(shared networking) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/metavoxels/CMakeLists.txt b/tests/metavoxels/CMakeLists.txt index 0fad728764..53b6da4301 100644 --- a/tests/metavoxels/CMakeLists.txt +++ b/tests/metavoxels/CMakeLists.txt @@ -1,13 +1,13 @@ set(TARGET_NAME metavoxel-tests) -auto_mtc(${TARGET_NAME} "${ROOT_DIR}") +auto_mtc() -include_glm(${TARGET_NAME}) +include_glm() -setup_hifi_project(${TARGET_NAME} Network Script Widgets) +setup_hifi_project(Network Script Widgets) # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} metavoxels networking shared) +link_hifi_libraries(metavoxels networking shared) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/networking/CMakeLists.txt b/tests/networking/CMakeLists.txt index 214b66fd1f..28fdb539b7 100644 --- a/tests/networking/CMakeLists.txt +++ b/tests/networking/CMakeLists.txt @@ -1,9 +1,9 @@ set(TARGET_NAME networking-tests) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared networking) +link_hifi_libraries(shared networking) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/octree/CMakeLists.txt b/tests/octree/CMakeLists.txt index baae258643..b59344f7f0 100644 --- a/tests/octree/CMakeLists.txt +++ b/tests/octree/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME octree-tests) -setup_hifi_project(${TARGET_NAME} Script Network) +setup_hifi_project(Script Network) -include_glm(${TARGET_NAME}) +include_glm() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} animation fbx models networking octree shared) +link_hifi_libraries(animation fbx models networking octree shared) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/physics/CMakeLists.txt b/tests/physics/CMakeLists.txt index e2affa7b47..c2c9327fa0 100644 --- a/tests/physics/CMakeLists.txt +++ b/tests/physics/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME physics-tests) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() -include_glm(${TARGET_NAME}) +include_glm() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared) +link_hifi_libraries(shared) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tests/shared/CMakeLists.txt b/tests/shared/CMakeLists.txt index f819a2734b..8fa2a1c3c4 100644 --- a/tests/shared/CMakeLists.txt +++ b/tests/shared/CMakeLists.txt @@ -1,11 +1,11 @@ set(TARGET_NAME shared-tests) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() -include_glm(${TARGET_NAME}) +include_glm() # link in the shared libraries -link_hifi_libraries(${TARGET_NAME} shared) +link_hifi_libraries(shared) # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tools/bitstream2json/CMakeLists.txt b/tools/bitstream2json/CMakeLists.txt index 884f9f9c2c..5cf833eaef 100644 --- a/tools/bitstream2json/CMakeLists.txt +++ b/tools/bitstream2json/CMakeLists.txt @@ -1,5 +1,5 @@ set(TARGET_NAME bitstream2json) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tools/json2bitstream/CMakeLists.txt b/tools/json2bitstream/CMakeLists.txt index 3868b551ea..d8619d95a3 100644 --- a/tools/json2bitstream/CMakeLists.txt +++ b/tools/json2bitstream/CMakeLists.txt @@ -1,5 +1,5 @@ set(TARGET_NAME json2bitstream) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/tools/mtc/CMakeLists.txt b/tools/mtc/CMakeLists.txt index dc30da8098..2a530f3c66 100644 --- a/tools/mtc/CMakeLists.txt +++ b/tools/mtc/CMakeLists.txt @@ -1,5 +1,5 @@ set(TARGET_NAME mtc) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file diff --git a/voxel-edit/CMakeLists.txt b/voxel-edit/CMakeLists.txt index f9f8ed185b..fea2e27ab1 100644 --- a/voxel-edit/CMakeLists.txt +++ b/voxel-edit/CMakeLists.txt @@ -1,6 +1,6 @@ set(TARGET_NAME voxel-edit) -setup_hifi_project(${TARGET_NAME}) +setup_hifi_project() # link any shared dependencies -link_shared_dependencies_to_target(${TARGET_NAME}) \ No newline at end of file +link_shared_dependencies() \ No newline at end of file