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) 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/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/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 ff813343ab..df77a3c2d1 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -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) @@ -246,4 +242,4 @@ else (APPLE) endif (APPLE) # link any dependencies bubbled up from our linked dependencies -link_shared_dependencies() +include_dependency_includes() diff --git a/interface/src/Hair.cpp b/interface/src/Hair.cpp index 6fd326a9b5..c2d3f78b98 100644 --- a/interface/src/Hair.cpp +++ b/interface/src/Hair.cpp @@ -12,11 +12,12 @@ #include -#include "Hair.h" - #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/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 42b3cf7d3c..69d0f23717 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() +# 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 1e77afe544..6d7f5ee960 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() +# 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 e48baa7615..10aba41ebb 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() +# 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 e63495867e..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}") @@ -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 a6943addcc..97dc9c7bc8 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -5,12 +5,7 @@ setup_hifi_library(Widgets OpenGL Network Script) include_glm() -link_hifi_libraries(shared gpu) +link_hifi_libraries(animation fbx shared gpu) -if (WIN32) - find_package(GLUT REQUIRED) - include_directories(SYSTEM "${GLUT_INCLUDE_DIRS}") -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 3b3a63549d..86e6c83b5d 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() +# 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 17ccbdc6ce..4b271bfeda 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 +# 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