From 6beaa3d59a061ee9f111668ee7c90a32f9eb6c95 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:36:15 -0800 Subject: [PATCH 01/16] set policy for shared lib creation on OS X --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a6118bb87..a0d463b766 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,10 @@ if (POLICY CMP0043) cmake_policy(SET CMP0043 OLD) endif () +if (POLICY CMP0042) + cmake_policy(SET CMP0042 OLD) +endif () + project(hifi) add_definitions(-DGLM_FORCE_RADIANS) From 6a604ca340f24d514fccdd9f83c776ad43d98f98 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:36:31 -0800 Subject: [PATCH 02/16] fix missing script dependency from shared --- libraries/shared/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/shared/CMakeLists.txt b/libraries/shared/CMakeLists.txt index 17ccbdc6ce..b5a44c96e2 100644 --- a/libraries/shared/CMakeLists.txt +++ b/libraries/shared/CMakeLists.txt @@ -1,7 +1,8 @@ set(TARGET_NAME shared) # use setup_hifi_library macro to setup our project and link appropriate Qt modules -setup_hifi_library(Network Widgets) +# TODO: there isn't really a good reason to have Script linked here - let's get what is requiring it out (RegisteredMetaTypes.cpp) +setup_hifi_library(Network Script Widgets) # call macro to link our dependencies and bubble them up via a property on our target link_shared_dependencies() \ No newline at end of file From ecb17a61d6c7609b218ff92e8bad03a62d404223 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:39:35 -0800 Subject: [PATCH 03/16] fix missing render-utils dependencies --- libraries/render-utils/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libraries/render-utils/CMakeLists.txt b/libraries/render-utils/CMakeLists.txt index a6943addcc..881a75636b 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -5,11 +5,15 @@ setup_hifi_library(Widgets OpenGL Network Script) include_glm() -link_hifi_libraries(shared gpu) +link_hifi_libraries(fbx shared gpu) -if (WIN32) +if (APPLE) + find_library(GLUT GLUT) + target_link_libraries(${TARGET_NAME} GLUT) +else () find_package(GLUT REQUIRED) include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}") + target_link_libraries(${TARGET_NAME} ${GLUT_LIBRARIES}) endif () # call macro to link our dependencies and bubble them up via a property on our target From 1b5552de1a9e2f0225cde7faf7a4a70284c520b2 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:42:08 -0800 Subject: [PATCH 04/16] fix GLUT library link in render-utils --- libraries/render-utils/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render-utils/CMakeLists.txt b/libraries/render-utils/CMakeLists.txt index 881a75636b..4108462000 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -9,7 +9,7 @@ link_hifi_libraries(fbx shared gpu) if (APPLE) find_library(GLUT GLUT) - target_link_libraries(${TARGET_NAME} GLUT) + target_link_libraries(${TARGET_NAME} ${GLUT}) else () find_package(GLUT REQUIRED) include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}") From 4f4ffc42d35d269ce871d25146edc86eb5829726 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:52:16 -0800 Subject: [PATCH 05/16] add missing link to fbx from avatars --- libraries/avatars/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/avatars/CMakeLists.txt b/libraries/avatars/CMakeLists.txt index 42b3cf7d3c..20aba226e0 100644 --- a/libraries/avatars/CMakeLists.txt +++ b/libraries/avatars/CMakeLists.txt @@ -5,8 +5,7 @@ setup_hifi_library(Network Script) include_glm() -link_hifi_libraries(shared octree voxels networking physics) -include_hifi_library_headers(fbx) +link_hifi_libraries(audio shared octree voxels networking physics fbx) # call macro to link our dependencies and bubble them up via a property on our target link_shared_dependencies() From e8adc19ac67088c386b56b21c528925829a04644 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:52:31 -0800 Subject: [PATCH 06/16] fix more missing dependencies in render-utils --- libraries/render-utils/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render-utils/CMakeLists.txt b/libraries/render-utils/CMakeLists.txt index 4108462000..211c7266b3 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -5,7 +5,7 @@ setup_hifi_library(Widgets OpenGL Network Script) include_glm() -link_hifi_libraries(fbx shared gpu) +link_hifi_libraries(animation fbx shared gpu) if (APPLE) find_library(GLUT GLUT) From 4bd3a94794ba8352c4dbc69227455587dd5bd7cb Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:53:52 -0800 Subject: [PATCH 07/16] add missing avatars link to entities --- libraries/entities/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/entities/CMakeLists.txt b/libraries/entities/CMakeLists.txt index e48baa7615..d6f503f2ca 100644 --- a/libraries/entities/CMakeLists.txt +++ b/libraries/entities/CMakeLists.txt @@ -5,7 +5,7 @@ setup_hifi_library(Network Script) include_glm() -link_hifi_libraries(shared octree fbx networking animation physics) +link_hifi_libraries(avatars shared octree fbx networking animation physics) # call macro to link our dependencies and bubble them up via a property on our target link_shared_dependencies() From d87e06a9d36ff91f51905f05749c74c55e6ec3f2 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 14:54:05 -0800 Subject: [PATCH 08/16] add missing metavoxels link to script-engine --- libraries/script-engine/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/script-engine/CMakeLists.txt b/libraries/script-engine/CMakeLists.txt index 3b3a63549d..7118e84443 100644 --- a/libraries/script-engine/CMakeLists.txt +++ b/libraries/script-engine/CMakeLists.txt @@ -5,7 +5,7 @@ setup_hifi_library(Gui Network Script Widgets) include_glm() -link_hifi_libraries(shared octree voxels fbx entities animation audio physics) +link_hifi_libraries(shared octree voxels fbx entities animation audio physics metavoxels) # call macro to link our dependencies and bubble them up via a property on our target link_shared_dependencies() From f474cfc9d0e89abf3ec52758582db575e08514da Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 15:06:44 -0800 Subject: [PATCH 09/16] link to render-utils from entities renderer --- libraries/entities-renderer/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/entities-renderer/CMakeLists.txt b/libraries/entities-renderer/CMakeLists.txt index 1e77afe544..3b8a214675 100644 --- a/libraries/entities-renderer/CMakeLists.txt +++ b/libraries/entities-renderer/CMakeLists.txt @@ -5,7 +5,7 @@ setup_hifi_library(Widgets OpenGL Network Script) include_glm() -link_hifi_libraries(shared gpu script-engine) +link_hifi_libraries(shared gpu script-engine render-utils) # call macro to link our dependencies and bubble them up via a property on our target link_shared_dependencies() From 114e3bb2ff27ea5e8f9ac67e29cf5ac78c64e60e Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Dec 2014 16:51:20 -0800 Subject: [PATCH 10/16] rename cmake macro to represent actual purpose --- assignment-client/CMakeLists.txt | 2 +- ...edDependencies.cmake => IncludeDependencyIncludes.cmake} | 6 +++--- domain-server/CMakeLists.txt | 2 +- ice-server/CMakeLists.txt | 2 +- interface/CMakeLists.txt | 2 +- libraries/animation/CMakeLists.txt | 4 ++-- libraries/audio/CMakeLists.txt | 4 ++-- libraries/avatars/CMakeLists.txt | 4 ++-- libraries/embedded-webserver/CMakeLists.txt | 4 ++-- libraries/entities-renderer/CMakeLists.txt | 4 ++-- libraries/entities/CMakeLists.txt | 4 ++-- libraries/fbx/CMakeLists.txt | 4 ++-- libraries/gpu/CMakeLists.txt | 4 ++-- libraries/metavoxels/CMakeLists.txt | 4 ++-- libraries/networking/CMakeLists.txt | 4 ++-- libraries/octree/CMakeLists.txt | 4 ++-- libraries/physics/CMakeLists.txt | 4 ++-- libraries/render-utils/CMakeLists.txt | 4 ++-- libraries/script-engine/CMakeLists.txt | 4 ++-- libraries/shared/CMakeLists.txt | 4 ++-- libraries/voxels/CMakeLists.txt | 4 ++-- tests/audio/CMakeLists.txt | 2 +- tests/jitter/CMakeLists.txt | 2 +- tests/metavoxels/CMakeLists.txt | 2 +- tests/networking/CMakeLists.txt | 2 +- tests/octree/CMakeLists.txt | 2 +- tests/physics/CMakeLists.txt | 2 +- tests/shared/CMakeLists.txt | 2 +- tools/bitstream2json/CMakeLists.txt | 2 +- tools/json2bitstream/CMakeLists.txt | 2 +- tools/mtc/CMakeLists.txt | 2 +- 31 files changed, 49 insertions(+), 49 deletions(-) rename cmake/macros/{LinkSharedDependencies.cmake => IncludeDependencyIncludes.cmake} (86%) diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index 6e31182f0d..88b2b62bd9 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -15,4 +15,4 @@ if (UNIX) target_link_libraries(${TARGET_NAME} ${CMAKE_DL_LIBS}) endif (UNIX) -link_shared_dependencies() +include_dependency_includes() diff --git a/cmake/macros/LinkSharedDependencies.cmake b/cmake/macros/IncludeDependencyIncludes.cmake similarity index 86% rename from cmake/macros/LinkSharedDependencies.cmake rename to cmake/macros/IncludeDependencyIncludes.cmake index 9168c5a921..a375404164 100644 --- a/cmake/macros/LinkSharedDependencies.cmake +++ b/cmake/macros/IncludeDependencyIncludes.cmake @@ -1,5 +1,5 @@ # -# LinkSharedDependencies.cmake +# IncludeDependencyIncludes.cmake # cmake/macros # # Copyright 2014 High Fidelity, Inc. @@ -9,7 +9,7 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # -macro(LINK_SHARED_DEPENDENCIES) +macro(INCLUDE_DEPENDENCY_INCLUDES) if (${TARGET_NAME}_DEPENDENCY_INCLUDES) list(REMOVE_DUPLICATES ${TARGET_NAME}_DEPENDENCY_INCLUDES) @@ -19,4 +19,4 @@ macro(LINK_SHARED_DEPENDENCIES) # 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}") -endmacro(LINK_SHARED_DEPENDENCIES) \ No newline at end of file +endmacro(INCLUDE_DEPENDENCY_INCLUDES) \ No newline at end of file diff --git a/domain-server/CMakeLists.txt b/domain-server/CMakeLists.txt index 482c397b14..421a1da2d4 100644 --- a/domain-server/CMakeLists.txt +++ b/domain-server/CMakeLists.txt @@ -52,4 +52,4 @@ include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") # append OpenSSL to our list of libraries to link target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES}) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/ice-server/CMakeLists.txt b/ice-server/CMakeLists.txt index c81ba16248..24e780f9aa 100644 --- a/ice-server/CMakeLists.txt +++ b/ice-server/CMakeLists.txt @@ -6,4 +6,4 @@ setup_hifi_project(Network) # link the shared hifi libraries link_hifi_libraries(networking shared) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index a9688a5919..659ecf600f 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -246,4 +246,4 @@ else (APPLE) endif (APPLE) # link any dependencies bubbled up from our linked dependencies -link_shared_dependencies() +include_dependency_includes() diff --git a/libraries/animation/CMakeLists.txt b/libraries/animation/CMakeLists.txt index 3f65c1ab6c..d7cbe43e28 100644 --- a/libraries/animation/CMakeLists.txt +++ b/libraries/animation/CMakeLists.txt @@ -5,5 +5,5 @@ setup_hifi_library(Network Script) link_hifi_libraries(shared fbx) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/libraries/audio/CMakeLists.txt b/libraries/audio/CMakeLists.txt index 6ade1fc423..b08d9e88f4 100644 --- a/libraries/audio/CMakeLists.txt +++ b/libraries/audio/CMakeLists.txt @@ -7,5 +7,5 @@ include_glm() link_hifi_libraries(networking shared) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/libraries/avatars/CMakeLists.txt b/libraries/avatars/CMakeLists.txt index 20aba226e0..69d0f23717 100644 --- a/libraries/avatars/CMakeLists.txt +++ b/libraries/avatars/CMakeLists.txt @@ -7,5 +7,5 @@ include_glm() link_hifi_libraries(audio shared octree voxels networking physics fbx) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/embedded-webserver/CMakeLists.txt b/libraries/embedded-webserver/CMakeLists.txt index 6e4b92e217..ef2cf1054c 100644 --- a/libraries/embedded-webserver/CMakeLists.txt +++ b/libraries/embedded-webserver/CMakeLists.txt @@ -3,5 +3,5 @@ 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 link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/libraries/entities-renderer/CMakeLists.txt b/libraries/entities-renderer/CMakeLists.txt index 3b8a214675..6d7f5ee960 100644 --- a/libraries/entities-renderer/CMakeLists.txt +++ b/libraries/entities-renderer/CMakeLists.txt @@ -7,5 +7,5 @@ include_glm() link_hifi_libraries(shared gpu script-engine render-utils) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/entities/CMakeLists.txt b/libraries/entities/CMakeLists.txt index d6f503f2ca..10aba41ebb 100644 --- a/libraries/entities/CMakeLists.txt +++ b/libraries/entities/CMakeLists.txt @@ -7,5 +7,5 @@ include_glm() link_hifi_libraries(avatars shared octree fbx networking animation physics) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/fbx/CMakeLists.txt b/libraries/fbx/CMakeLists.txt index 5a151deb8b..4f4cb6eb76 100644 --- a/libraries/fbx/CMakeLists.txt +++ b/libraries/fbx/CMakeLists.txt @@ -11,5 +11,5 @@ find_package(ZLIB REQUIRED) include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}") target_link_libraries(${TARGET_NAME} ${ZLIB_LIBRARIES}) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/gpu/CMakeLists.txt b/libraries/gpu/CMakeLists.txt index 340adcc9e6..1264c1bf5c 100644 --- a/libraries/gpu/CMakeLists.txt +++ b/libraries/gpu/CMakeLists.txt @@ -44,5 +44,5 @@ else () list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${OPENGL_INCLUDE_DIR}") endif (APPLE) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/metavoxels/CMakeLists.txt b/libraries/metavoxels/CMakeLists.txt index aab8d2184d..4ead36e51a 100644 --- a/libraries/metavoxels/CMakeLists.txt +++ b/libraries/metavoxels/CMakeLists.txt @@ -10,5 +10,5 @@ link_hifi_libraries(shared networking) include_glm() -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/libraries/networking/CMakeLists.txt b/libraries/networking/CMakeLists.txt index 934e3e69b9..bc251a42d4 100644 --- a/libraries/networking/CMakeLists.txt +++ b/libraries/networking/CMakeLists.txt @@ -28,5 +28,5 @@ target_link_libraries(${TARGET_NAME} ${OPENSSL_LIBRARIES} ${TBB_LIBRARIES}) # append libcuckoo includes to our list of includes to bubble list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES "${TBB_INCLUDE_DIRS}") -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/libraries/octree/CMakeLists.txt b/libraries/octree/CMakeLists.txt index e8c6554ff4..cd90857637 100644 --- a/libraries/octree/CMakeLists.txt +++ b/libraries/octree/CMakeLists.txt @@ -15,5 +15,5 @@ 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 link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/physics/CMakeLists.txt b/libraries/physics/CMakeLists.txt index 5270f08730..4f74038ff5 100644 --- a/libraries/physics/CMakeLists.txt +++ b/libraries/physics/CMakeLists.txt @@ -15,5 +15,5 @@ link_hifi_libraries(shared) ## append BULLET to our list of libraries to link #list(APPEND ${TARGET_NAME}_LIBRARIES_TO_LINK "${BULLET_LIBRARIES}") -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/render-utils/CMakeLists.txt b/libraries/render-utils/CMakeLists.txt index 211c7266b3..99d01760f8 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -16,5 +16,5 @@ else () target_link_libraries(${TARGET_NAME} ${GLUT_LIBRARIES}) endif () -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/script-engine/CMakeLists.txt b/libraries/script-engine/CMakeLists.txt index 7118e84443..86e6c83b5d 100644 --- a/libraries/script-engine/CMakeLists.txt +++ b/libraries/script-engine/CMakeLists.txt @@ -7,5 +7,5 @@ include_glm() link_hifi_libraries(shared octree voxels fbx entities animation audio physics metavoxels) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() diff --git a/libraries/shared/CMakeLists.txt b/libraries/shared/CMakeLists.txt index b5a44c96e2..4b271bfeda 100644 --- a/libraries/shared/CMakeLists.txt +++ b/libraries/shared/CMakeLists.txt @@ -4,5 +4,5 @@ set(TARGET_NAME shared) # TODO: there isn't really a good reason to have Script linked here - let's get what is requiring it out (RegisteredMetaTypes.cpp) setup_hifi_library(Network Script Widgets) -# call macro to link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/libraries/voxels/CMakeLists.txt b/libraries/voxels/CMakeLists.txt index 7980094884..75b5143321 100644 --- a/libraries/voxels/CMakeLists.txt +++ b/libraries/voxels/CMakeLists.txt @@ -14,5 +14,5 @@ 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 link our dependencies and bubble them up via a property on our target -link_shared_dependencies() \ No newline at end of file +# call macro to include our dependency includes and bubble them up via a property on our target +include_dependency_includes() \ No newline at end of file diff --git a/tests/audio/CMakeLists.txt b/tests/audio/CMakeLists.txt index 974b4dcd09..fb6b9c2e11 100644 --- a/tests/audio/CMakeLists.txt +++ b/tests/audio/CMakeLists.txt @@ -7,4 +7,4 @@ include_glm() # link in the shared libraries link_hifi_libraries(shared audio networking) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tests/jitter/CMakeLists.txt b/tests/jitter/CMakeLists.txt index d0b366e7ef..93f7caefdd 100644 --- a/tests/jitter/CMakeLists.txt +++ b/tests/jitter/CMakeLists.txt @@ -5,4 +5,4 @@ setup_hifi_project() # link in the shared libraries link_hifi_libraries(shared networking) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tests/metavoxels/CMakeLists.txt b/tests/metavoxels/CMakeLists.txt index 732c974f95..7524c5c87c 100644 --- a/tests/metavoxels/CMakeLists.txt +++ b/tests/metavoxels/CMakeLists.txt @@ -9,4 +9,4 @@ setup_hifi_project(Network Script Widgets) # link in the shared libraries link_hifi_libraries(metavoxels networking shared) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tests/networking/CMakeLists.txt b/tests/networking/CMakeLists.txt index a7293226b3..113a75ab50 100644 --- a/tests/networking/CMakeLists.txt +++ b/tests/networking/CMakeLists.txt @@ -5,4 +5,4 @@ setup_hifi_project() # link in the shared libraries link_hifi_libraries(shared networking) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tests/octree/CMakeLists.txt b/tests/octree/CMakeLists.txt index 7139d4edb6..3382f684cb 100644 --- a/tests/octree/CMakeLists.txt +++ b/tests/octree/CMakeLists.txt @@ -7,4 +7,4 @@ include_glm() # link in the shared libraries link_hifi_libraries(shared octree voxels fbx metavoxels networking entities avatars audio animation script-engine physics) -link_shared_dependencies() +include_dependency_includes() diff --git a/tests/physics/CMakeLists.txt b/tests/physics/CMakeLists.txt index d47b979459..31c741eecf 100644 --- a/tests/physics/CMakeLists.txt +++ b/tests/physics/CMakeLists.txt @@ -7,4 +7,4 @@ include_glm() # link in the shared libraries link_hifi_libraries(shared physics) -link_shared_dependencies() +include_dependency_includes() diff --git a/tests/shared/CMakeLists.txt b/tests/shared/CMakeLists.txt index fe3843e9eb..f067fa52b5 100644 --- a/tests/shared/CMakeLists.txt +++ b/tests/shared/CMakeLists.txt @@ -7,4 +7,4 @@ include_glm() # link in the shared libraries link_hifi_libraries(shared) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tools/bitstream2json/CMakeLists.txt b/tools/bitstream2json/CMakeLists.txt index bc23a1e193..2e8bb213be 100644 --- a/tools/bitstream2json/CMakeLists.txt +++ b/tools/bitstream2json/CMakeLists.txt @@ -5,4 +5,4 @@ include_glm() link_hifi_libraries(metavoxels) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tools/json2bitstream/CMakeLists.txt b/tools/json2bitstream/CMakeLists.txt index 91b56c18fd..283d450e11 100644 --- a/tools/json2bitstream/CMakeLists.txt +++ b/tools/json2bitstream/CMakeLists.txt @@ -5,4 +5,4 @@ include_glm() link_hifi_libraries(metavoxels) -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file diff --git a/tools/mtc/CMakeLists.txt b/tools/mtc/CMakeLists.txt index 4dfa8421ff..06b9f86d06 100644 --- a/tools/mtc/CMakeLists.txt +++ b/tools/mtc/CMakeLists.txt @@ -1,4 +1,4 @@ set(TARGET_NAME mtc) setup_hifi_project() -link_shared_dependencies() \ No newline at end of file +include_dependency_includes() \ No newline at end of file From 715b3a245e39e1437c242f10ea00d21cb5a8f595 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 19 Dec 2014 10:53:36 -0800 Subject: [PATCH 11/16] remove GLUT from Cmake files --- cmake/modules/FindGLUT.cmake | 47 --------------------------- interface/CMakeLists.txt | 14 +++----- libraries/render-utils/CMakeLists.txt | 9 ----- 3 files changed, 5 insertions(+), 65 deletions(-) delete mode 100644 cmake/modules/FindGLUT.cmake diff --git a/cmake/modules/FindGLUT.cmake b/cmake/modules/FindGLUT.cmake deleted file mode 100644 index e7bf752aca..0000000000 --- a/cmake/modules/FindGLUT.cmake +++ /dev/null @@ -1,47 +0,0 @@ -# -# FindGLUT.cmake -# -# Try to find GLUT library and include path. -# Once done this will define -# -# GLUT_FOUND -# GLUT_INCLUDE_DIRS -# GLUT_LIBRARIES -# -# Created on 2/6/2014 by Stephen Birarda -# Copyright 2014 High Fidelity, Inc. -# -# Adapted from FindGLUT.cmake available in tlorach's OpenGLText Repository -# https://raw.github.com/tlorach/OpenGLText/master/cmake/FindGLUT.cmake -# -# Distributed under the Apache License, Version 2.0. -# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -# - -include("${MACRO_DIR}/HifiLibrarySearchHints.cmake") -hifi_library_search_hints("freeglut") - -if (WIN32) - set(GLUT_HINT_DIRS "${FREEGLUT_SEARCH_DIRS} ${OPENGL_INCLUDE_DIR}") - - find_path(GLUT_INCLUDE_DIRS GL/glut.h PATH_SUFFIXES include HINTS ${FREEGLUT_SEARCH_DIRS}) - find_library(GLUT_LIBRARY freeglut PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS}) -else () - find_path(GLUT_INCLUDE_DIRS GL/glut.h PATH_SUFFIXES include HINTS ${FREEGLUT_SEARCH_DIRS}) - find_library(GLUT_LIBRARY glut PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS}) -endif () - -include(FindPackageHandleStandardArgs) - -set(GLUT_LIBRARIES "${GLUT_LIBRARY}" "${XMU_LIBRARY}" "${XI_LIBRARY}") - -if (UNIX) - find_library(XI_LIBRARY Xi PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS}) - find_library(XMU_LIBRARY Xmu PATH_SUFFIXES lib HINTS ${FREEGLUT_SEARCH_DIRS}) - - find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIRS GLUT_LIBRARIES XI_LIBRARY XMU_LIBRARY) -else () - find_package_handle_standard_args(GLUT DEFAULT_MSG GLUT_INCLUDE_DIRS GLUT_LIBRARIES) -endif () - -mark_as_advanced(GLUT_INCLUDE_DIRS GLUT_LIBRARIES GLUT_LIBRARY XI_LIBRARY XMU_LIBRARY FREEGLUT_SEARCH_DIRS) \ No newline at end of file diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 659ecf600f..ebbce669ea 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -25,15 +25,15 @@ else () endif () if (APPLE) - set(GL_HEADERS "#include \n#include ") + set(GL_HEADERS "#include ") elseif (UNIX) # include the right GL headers for UNIX - set(GL_HEADERS "#include \n#include \n#include ") + set(GL_HEADERS "#include \n#include ") elseif (WIN32) add_definitions(-D_USE_MATH_DEFINES) # apparently needed to get M_PI and other defines from cmath/math.h add_definitions(-DWINDOWS_LEAN_AND_MEAN) # needed to make sure windows doesn't go to crazy with its defines - set(GL_HEADERS "#include \n#include \n#include \n#include ") + set(GL_HEADERS "#include \n#include \n#include ") endif () # set up the external glm library @@ -194,11 +194,10 @@ if (APPLE) # link in required OS X frameworks and include the right GL headers find_library(CoreAudio CoreAudio) find_library(CoreFoundation CoreFoundation) - find_library(GLUT GLUT) find_library(OpenGL OpenGL) find_library(AppKit AppKit) - target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation} ${GLUT} ${OpenGL} ${AppKit}) + target_link_libraries(${TARGET_NAME} ${CoreAudio} ${CoreFoundation} ${OpenGL} ${AppKit}) # install command for OS X bundle INSTALL(TARGETS ${TARGET_NAME} @@ -214,15 +213,12 @@ else (APPLE) ) find_package(OpenGL REQUIRED) - find_package(GLUT REQUIRED) - - include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}") if (${OPENGL_INCLUDE_DIR}) include_directories(SYSTEM "${OPENGL_INCLUDE_DIR}") endif () - target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}" "${GLUT_LIBRARIES}") + target_link_libraries(${TARGET_NAME} "${OPENGL_LIBRARY}") # link target to external libraries if (WIN32) diff --git a/libraries/render-utils/CMakeLists.txt b/libraries/render-utils/CMakeLists.txt index 99d01760f8..97dc9c7bc8 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -7,14 +7,5 @@ include_glm() link_hifi_libraries(animation fbx shared gpu) -if (APPLE) - find_library(GLUT GLUT) - target_link_libraries(${TARGET_NAME} ${GLUT}) -else () - find_package(GLUT REQUIRED) - include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}") - target_link_libraries(${TARGET_NAME} ${GLUT_LIBRARIES}) -endif () - # call macro to include our dependency includes and bubble them up via a property on our target include_dependency_includes() From 115dc28c9cabe9e5d35bcb881f7ae93d76f05ea1 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 19 Dec 2014 10:54:00 -0800 Subject: [PATCH 12/16] add glu includes on OS X to stopgap GLUT removal --- interface/src/Hair.cpp | 5 ++++- interface/src/avatar/Avatar.cpp | 5 +++++ interface/src/ui/ApplicationOverlay.cpp | 5 +++++ interface/src/ui/RearMirrorTools.cpp | 5 +++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/interface/src/Hair.cpp b/interface/src/Hair.cpp index cb664f39ed..c2d3f78b98 100644 --- a/interface/src/Hair.cpp +++ b/interface/src/Hair.cpp @@ -10,11 +10,14 @@ // // Creates single flexible verlet-integrated strands that can be used for hair/fur/grass -#include "Hair.h" +#include #include "Util.h" #include "world.h" +#include "Hair.h" + + const float HAIR_DAMPING = 0.99f; const float CONSTRAINT_RELAXATION = 10.0f; const float HAIR_ACCELERATION_COUPLING = 0.045f; diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 39c528d080..aa94b21d71 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -13,6 +13,11 @@ #include +// TODO: remove calls to gluProject to remove this include +#ifdef __APPLE__ +#include +#endif + #include #include diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index ab85da125c..f82b44a403 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -11,6 +11,11 @@ #include "InterfaceConfig.h" +// TODO: remove calls to gluProject to remove this include +#ifdef __APPLE__ +#include +#endif + #include #include diff --git a/interface/src/ui/RearMirrorTools.cpp b/interface/src/ui/RearMirrorTools.cpp index fd3fc34adb..2c671ef548 100644 --- a/interface/src/ui/RearMirrorTools.cpp +++ b/interface/src/ui/RearMirrorTools.cpp @@ -11,6 +11,11 @@ #include "InterfaceConfig.h" +// TODO: remove calls to gluProject to remove this include +#ifdef __APPLE__ +#include +#endif + #include #include From 4f478e158f728412006464e0307013d908ad6e4b Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 19 Dec 2014 13:59:43 -0800 Subject: [PATCH 13/16] remove includes for glu for APPLE --- interface/src/avatar/Avatar.cpp | 5 ----- interface/src/ui/ApplicationOverlay.cpp | 5 ----- interface/src/ui/RearMirrorTools.cpp | 5 ----- 3 files changed, 15 deletions(-) diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index aa94b21d71..39c528d080 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -13,11 +13,6 @@ #include -// TODO: remove calls to gluProject to remove this include -#ifdef __APPLE__ -#include -#endif - #include #include diff --git a/interface/src/ui/ApplicationOverlay.cpp b/interface/src/ui/ApplicationOverlay.cpp index f82b44a403..ab85da125c 100644 --- a/interface/src/ui/ApplicationOverlay.cpp +++ b/interface/src/ui/ApplicationOverlay.cpp @@ -11,11 +11,6 @@ #include "InterfaceConfig.h" -// TODO: remove calls to gluProject to remove this include -#ifdef __APPLE__ -#include -#endif - #include #include diff --git a/interface/src/ui/RearMirrorTools.cpp b/interface/src/ui/RearMirrorTools.cpp index 2c671ef548..fd3fc34adb 100644 --- a/interface/src/ui/RearMirrorTools.cpp +++ b/interface/src/ui/RearMirrorTools.cpp @@ -11,11 +11,6 @@ #include "InterfaceConfig.h" -// TODO: remove calls to gluProject to remove this include -#ifdef __APPLE__ -#include -#endif - #include #include From 691be3bf7c4e29b596b44ba3c889f4111c306cb0 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 19 Dec 2014 14:59:55 -0800 Subject: [PATCH 14/16] add a test to confirm link fail --- libraries/gpu/src/gpu/GLBackend.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/GLBackend.cpp b/libraries/gpu/src/gpu/GLBackend.cpp index 90639929ca..6663e0b169 100644 --- a/libraries/gpu/src/gpu/GLBackend.cpp +++ b/libraries/gpu/src/gpu/GLBackend.cpp @@ -117,7 +117,8 @@ GLBackend::GLBackend() : _input(), _transform() { - + // TEST FOR SANITY + glewInit(); } GLBackend::~GLBackend() { From d7d11955f3d4eafb3b7258ccd7f785752a1ff343 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 19 Dec 2014 15:05:13 -0800 Subject: [PATCH 15/16] Revert "add a test to confirm link fail" This reverts commit 691be3bf7c4e29b596b44ba3c889f4111c306cb0. --- libraries/gpu/src/gpu/GLBackend.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/gpu/src/gpu/GLBackend.cpp b/libraries/gpu/src/gpu/GLBackend.cpp index 6663e0b169..90639929ca 100644 --- a/libraries/gpu/src/gpu/GLBackend.cpp +++ b/libraries/gpu/src/gpu/GLBackend.cpp @@ -117,8 +117,7 @@ GLBackend::GLBackend() : _input(), _transform() { - // TEST FOR SANITY - glewInit(); + } GLBackend::~GLBackend() { From 2780415b1d4d529d91d8d6382d8cbadd8dbb18d1 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Fri, 19 Dec 2014 15:07:31 -0800 Subject: [PATCH 16/16] put glew link back into gpu --- libraries/gpu/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu/CMakeLists.txt b/libraries/gpu/CMakeLists.txt index b4da0d8b03..7f2b475dd2 100644 --- a/libraries/gpu/CMakeLists.txt +++ b/libraries/gpu/CMakeLists.txt @@ -19,7 +19,7 @@ elseif (WIN32) # we're using static GLEW, so define GLEW_STATIC add_definitions(-DGLEW_STATIC) - target_link_libraries(${TARGET_NAME} opengl32.lib) + 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}")