remove use of include_dependency_includes and use cmake

This commit is contained in:
Stephen Birarda 2015-02-18 14:12:05 -08:00
parent 71482f6ad7
commit b2e587dbbd
36 changed files with 33 additions and 148 deletions

View file

@ -17,6 +17,4 @@ if (UNIX)
target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS})
endif (UNIX)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -1,22 +0,0 @@
#
# IncludeDependencyIncludes.cmake
# cmake/macros
#
# Copyright 2014 High Fidelity, Inc.
# Created by Stephen Birarda on August 8, 2014
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(INCLUDE_DEPENDENCY_INCLUDES)
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})
# set the property on this target so it can be retreived by targets linking to us
set_target_properties(${TARGET_NAME} PROPERTIES DEPENDENCY_INCLUDES "${${TARGET_NAME}_DEPENDENCY_INCLUDES}")
endif()
endmacro(INCLUDE_DEPENDENCY_INCLUDES)

View file

@ -52,6 +52,4 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
# append OpenSSL to our list of libraries to link
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES})
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -29,7 +29,6 @@ find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PRIVATE ${GLM_INCLUDE_DIRS})
link_hifi_libraries(shared networking audio-client avatars)
include_dependency_includes()
if (ANDROID)
find_package(LibOVR)

View file

@ -6,6 +6,4 @@ setup_hifi_project(Network)
# link the shared hifi libraries
link_hifi_libraries(embedded-webserver networking shared)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -240,6 +240,3 @@ else (APPLE)
endif (APPLE)
copy_dlls_beside_windows_executable()
# link any dependencies bubbled up from our linked dependencies
include_dependency_includes()

View file

@ -3,7 +3,4 @@ set(TARGET_NAME animation)
# use setup_hifi_library macro to setup our project and link appropriate Qt modules
setup_hifi_library(Network Script)
link_hifi_libraries(shared gpu model fbx)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
link_hifi_libraries(shared gpu model fbx)

View file

@ -6,7 +6,7 @@ setup_hifi_library(Network Multimedia)
link_hifi_libraries(audio)
# append audio includes to our list of includes to bubble
list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${HIFI_LIBRARY_DIR}/audio/src")
target_include_directories(${TARGET_NAME} PUBLIC "${HIFI_LIBRARY_DIR}/audio/src")
# have CMake grab externals for us
add_dependency_external_projects(gverb soxr)
@ -25,7 +25,4 @@ if (APPLE)
find_library(CoreAudio CoreAudio)
find_library(CoreFoundation CoreFoundation)
target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation})
endif ()
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
endif ()

View file

@ -7,7 +7,4 @@ add_dependency_external_projects(glm)
find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(networking shared)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
link_hifi_libraries(networking shared)

View file

@ -8,6 +8,3 @@ find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(audio shared networking)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()

View file

@ -1,7 +1,4 @@
set(TARGET_NAME embedded-webserver)
# use setup_hifi_library macro to setup our project and link appropriate Qt modules
setup_hifi_library(Network)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
setup_hifi_library(Network)

View file

@ -7,7 +7,4 @@ add_dependency_external_projects(glm)
find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(shared gpu script-engine render-utils)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
link_hifi_libraries(shared gpu script-engine render-utils)

View file

@ -10,6 +10,3 @@ target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
include_bullet()
link_hifi_libraries(avatars shared octree gpu model fbx networking animation)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()

View file

@ -14,7 +14,4 @@ find_package(ZLIB REQUIRED)
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
# add it to our list of libraries to link
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})

View file

@ -11,7 +11,4 @@ link_hifi_libraries(shared gpu model networking octree)
find_package(ZLIB REQUIRED)
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})

View file

@ -19,8 +19,7 @@ elseif (WIN32)
target_link_libraries(${TARGET_NAME} ${GLEW_LIBRARIES} opengl32.lib)
# need to bubble up the GLEW_INCLUDE_DIRS
list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${GLEW_INCLUDE_DIRS}")
target_include_directories(${TARGET_NAME} PUBLIC ${GLEW_INCLUDE_DIRS})
# try to find the Nsight package and add it to the build if we find it
find_package(NSIGHT)
@ -40,9 +39,5 @@ else ()
target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}")
# need to bubble up the OPENGL_INCLUDE_DIR
list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${OPENGL_INCLUDE_DIR}")
target_include_directories(${TARGET_NAME} PUBLIC ${OPENGL_INCLUDE_DIR})
endif (APPLE)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()

View file

@ -10,7 +10,4 @@ link_hifi_libraries(shared networking)
add_dependency_external_projects(glm)
find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})

View file

@ -7,7 +7,4 @@ add_dependency_external_projects(glm)
find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(shared gpu)
# call macro to link our dependencies and bubble them up via a property on our target
include_dependency_includes()
link_hifi_libraries(shared gpu)

View file

@ -28,7 +28,4 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}")
target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES} ${TBB_LIBRARIES})
# append tbb includes to our list of includes to bubble
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS})
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${TBB_INCLUDE_DIRS})

View file

@ -16,6 +16,3 @@ include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
# append ZLIB and OpenSSL to our list of libraries to link
target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES})
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()

View file

@ -14,6 +14,3 @@ endif (BULLET_FOUND)
link_hifi_libraries(shared fbx entities)
include_hifi_library_headers(fbx)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()

View file

@ -1,23 +1,20 @@
set(TARGET_NAME render-utils)
AUTOSCRIBE_SHADER_LIB()
# pull in the resources.qrc file
qt5_add_resources(QT_RESOURCES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/res/fonts/fonts.qrc")
# use setup_hifi_library macro to setup our project and link appropriate Qt modules
setup_hifi_library(Widgets OpenGL Network Script)
add_dependency_external_projects(glm)
set(TARGET_NAME render-utils)
AUTOSCRIBE_SHADER_LIB()
# pull in the resources.qrc file
qt5_add_resources(QT_RESOURCES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/res/fonts/fonts.qrc")
# use setup_hifi_library macro to setup our project and link appropriate Qt modules
setup_hifi_library(Widgets OpenGL Network Script)
add_dependency_external_projects(glm)
find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(animation fbx shared gpu)
if (WIN32)
# we're using static GLEW, so define GLEW_STATIC
add_definitions(-DGLEW_STATIC)
endif ()
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(animation fbx shared gpu)
if (WIN32)
# we're using static GLEW, so define GLEW_STATIC
add_definitions(-DGLEW_STATIC)
endif ()

View file

@ -8,7 +8,3 @@ find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
link_hifi_libraries(shared octree gpu model fbx entities animation audio physics metavoxels)
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()

View file

@ -6,7 +6,4 @@ setup_hifi_library(Gui Network Script Widgets)
add_dependency_external_projects(glm)
find_package(GLM REQUIRED)
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
target_include_directories(${TARGET_NAME} PUBLIC ${GLM_INCLUDE_DIRS})

View file

@ -5,6 +5,4 @@ setup_hifi_project()
# link in the shared libraries
link_hifi_libraries(shared audio networking)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -5,6 +5,4 @@ setup_hifi_project()
# link in the shared libraries
link_hifi_libraries(shared networking)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -7,6 +7,4 @@ setup_hifi_project(Network Script Widgets)
# link in the shared libraries
link_hifi_libraries(metavoxels networking shared)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -5,6 +5,4 @@ setup_hifi_project()
# link in the shared libraries
link_hifi_libraries(shared networking)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -5,6 +5,4 @@ setup_hifi_project(Script Network)
# link in the shared libraries
link_hifi_libraries(shared octree gpu model fbx metavoxels networking entities avatars audio animation script-engine physics)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -10,6 +10,4 @@ include_bullet()
link_hifi_libraries(shared physics)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -12,7 +12,4 @@ if (WIN32)
add_definitions(-DGLEW_STATIC)
endif ()
#link_libraries(animation fbx shared gpu)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -5,6 +5,4 @@ setup_hifi_project()
# link in the shared libraries
link_hifi_libraries(shared)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -3,6 +3,4 @@ setup_hifi_project(Widgets Script)
link_hifi_libraries(metavoxels)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -3,6 +3,4 @@ setup_hifi_project(Widgets Script)
link_hifi_libraries(metavoxels)
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -1,6 +1,4 @@
set(TARGET_NAME mtc)
setup_hifi_project()
include_dependency_includes()
copy_dlls_beside_windows_executable()

View file

@ -1,7 +1,4 @@
set(TARGET_NAME scribe)
setup_hifi_project()
# call macro to include our dependency includes and bubble them up via a property on our target
include_dependency_includes()
copy_dlls_beside_windows_executable()