diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index eed870b3af..c44b04552f 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -188,6 +188,13 @@ jobs: sudo cp -rp MacOSX10.12.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ || exit 0 echo " done" fi + if [[ "${{ matrix.os }}" =~ "debian-11" ]]; then + echo "Installing CMake from Debian Backports" + echo deb http://deb.debian.org/debian bullseye-backports main > /etc/apt/sources.list.d/bullseye-backports.list + sudo apt update + sudo apt-get -t bullseye-backports install -y cmake + fi + - name: Override NSIS shell: pwsh diff --git a/CMakeLists.txt b/CMakeLists.txt index ebdaa71a2b..8ba18d982b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -187,7 +187,7 @@ else() set(VCPKG_BUILD_TYPE_PARAM --vcpkg-build-type ${VCPKG_BUILD_TYPE}) endif() execute_process( - COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --release-type ${RELEASE_TYPE} --build-root ${CMAKE_BINARY_DIR} ${VCPKG_BUILD_TYPE_PARAM} + COMMAND ${HIFI_PYTHON_EXEC} ${CMAKE_CURRENT_SOURCE_DIR}/prebuild.py --vcpkg-skip-clean --release-type ${RELEASE_TYPE} --build-root ${CMAKE_BINARY_DIR} ${VCPKG_BUILD_TYPE_PARAM} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} RESULTS_VARIABLE PREBUILD_RET ) # squelch the Policy CMP0074 warning without requiring an update to cmake 3.12. diff --git a/cmake/externals/GifCreator/CMakeLists.txt b/cmake/externals/GifCreator/CMakeLists.txt index bacfefd48b..a6ddb390e8 100644 --- a/cmake/externals/GifCreator/CMakeLists.txt +++ b/cmake/externals/GifCreator/CMakeLists.txt @@ -9,6 +9,7 @@ ExternalProject_Add( BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) # Hide this external target (for ide users) diff --git a/cmake/externals/LibOVR/CMakeLists.txt b/cmake/externals/LibOVR/CMakeLists.txt index 872d0e5fef..51a85f0117 100644 --- a/cmake/externals/LibOVR/CMakeLists.txt +++ b/cmake/externals/LibOVR/CMakeLists.txt @@ -22,6 +22,7 @@ if (WIN32) CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/LibOVRCMakeLists.txt" /CMakeLists.txt LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) @@ -44,6 +45,7 @@ elseif(APPLE) BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) diff --git a/cmake/externals/LibOVRPlatform/CMakeLists.txt b/cmake/externals/LibOVRPlatform/CMakeLists.txt index 40e6ae123c..492827210a 100644 --- a/cmake/externals/LibOVRPlatform/CMakeLists.txt +++ b/cmake/externals/LibOVRPlatform/CMakeLists.txt @@ -15,6 +15,7 @@ if (WIN32) BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) diff --git a/cmake/externals/crashpad/CMakeLists.txt b/cmake/externals/crashpad/CMakeLists.txt index ae6972cab1..c174022aa3 100644 --- a/cmake/externals/crashpad/CMakeLists.txt +++ b/cmake/externals/crashpad/CMakeLists.txt @@ -12,6 +12,7 @@ if (WIN32) BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) @@ -31,6 +32,7 @@ elseif (APPLE) BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) @@ -50,6 +52,7 @@ elseif (UNIX) BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) diff --git a/cmake/externals/neuron/CMakeLists.txt b/cmake/externals/neuron/CMakeLists.txt index 45b18f86cd..051b6214cc 100644 --- a/cmake/externals/neuron/CMakeLists.txt +++ b/cmake/externals/neuron/CMakeLists.txt @@ -7,13 +7,16 @@ string(TOUPPER ${EXTERNAL_NAME} EXTERNAL_NAME_UPPER) set(NEURON_URL "${EXTERNAL_BUILD_ASSETS}/dependencies/neuron_datareader_b.12.2.zip") set(NEURON_URL_MD5 "84273ad2200bf86a9279d1f412a822ca") -ExternalProject_Add(${EXTERNAL_NAME} - URL ${NEURON_URL} - URL_MD5 ${NEURON_URL_MD5} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" - LOG_DOWNLOAD 1) +ExternalProject_Add( + ${EXTERNAL_NAME} + URL ${NEURON_URL} + URL_MD5 ${NEURON_URL_MD5} + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 +) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) diff --git a/cmake/externals/serverless-content/CMakeLists.txt b/cmake/externals/serverless-content/CMakeLists.txt index 8bb49f0973..f512ae59a8 100644 --- a/cmake/externals/serverless-content/CMakeLists.txt +++ b/cmake/externals/serverless-content/CMakeLists.txt @@ -10,6 +10,7 @@ ExternalProject_Add( BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) # Hide this external target (for IDE users) diff --git a/cmake/externals/sixense/CMakeLists.txt b/cmake/externals/sixense/CMakeLists.txt index c2fb8ad8f9..8dc0107cc8 100644 --- a/cmake/externals/sixense/CMakeLists.txt +++ b/cmake/externals/sixense/CMakeLists.txt @@ -24,6 +24,7 @@ ExternalProject_Add( BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals") diff --git a/cmake/externals/steamworks/CMakeLists.txt b/cmake/externals/steamworks/CMakeLists.txt index f418b82ab5..47e5029206 100644 --- a/cmake/externals/steamworks/CMakeLists.txt +++ b/cmake/externals/steamworks/CMakeLists.txt @@ -15,6 +15,7 @@ ExternalProject_Add( BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals") diff --git a/cmake/externals/tbb/CMakeLists.txt b/cmake/externals/tbb/CMakeLists.txt index 8f8f2d3030..8d98b0b40e 100644 --- a/cmake/externals/tbb/CMakeLists.txt +++ b/cmake/externals/tbb/CMakeLists.txt @@ -21,6 +21,7 @@ ExternalProject_Add( CONFIGURE_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD ON + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) # Hide this external target (for ide users) diff --git a/cmake/externals/wasapi/CMakeLists.txt b/cmake/externals/wasapi/CMakeLists.txt index bc8148c278..9f552c56b8 100644 --- a/cmake/externals/wasapi/CMakeLists.txt +++ b/cmake/externals/wasapi/CMakeLists.txt @@ -12,13 +12,14 @@ if (WIN32) BUILD_COMMAND "" INSTALL_COMMAND "" LOG_DOWNLOAD 1 + DOWNLOAD_EXTRACT_TIMESTAMP 1 ) - + # Hide this external target (for ide users) set_target_properties(${EXTERNAL_NAME} PROPERTIES FOLDER "hidden/externals") - + ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) - + set(${EXTERNAL_NAME_UPPER}_DLL_PATH ${SOURCE_DIR} CACHE FILEPATH "Location of wasapi DLL") endif() diff --git a/cmake/ports/aristo/portfile.cmake b/cmake/ports/aristo/portfile.cmake index 94efe6f7ea..56ab815a1d 100644 --- a/cmake/ports/aristo/portfile.cmake +++ b/cmake/ports/aristo/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) set(ARISTO_VERSION 0.8.1) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) diff --git a/cmake/ports/bullet3/portfile.cmake b/cmake/ports/bullet3/portfile.cmake index ab27c8494d..04a61f7d14 100644 --- a/cmake/ports/bullet3/portfile.cmake +++ b/cmake/ports/bullet3/portfile.cmake @@ -13,8 +13,6 @@ # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # -include(vcpkg_common_functions) - if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) message(WARNING "Dynamic not supported, building static") @@ -31,40 +29,12 @@ vcpkg_from_github( PATCHES "bullet-git-fix-build-clang-8.patch" ) -if(WIN32) - set(VIRCADIA_BULLET_OPTIONS "") -else() - if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt") - file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt" VIRCADIA_OPTIMIZE) - endif() - if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt") - file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt" VIRCADIA_CPU_ARCHITECTURE) - endif() - - - if(VIRCADIA_OPTIMIZE) - set(VIRCADIA_BULLET_OPTIONS "-DCMAKE_BUILD_TYPE=Release") - else() - set(VIRCADIA_BULLET_OPTIONS "-DCMAKE_BUILD_TYPE=RelWithDebInfo") - endif() - - set(VIRCADIA_BULLET_OPTIONS "${VIRCADIA_BULLET_OPTIONS}") - - if(DEFINED VIRCADIA_CPU_ARCHITECTURE) - set(VIRCADIA_BULLET_OPTIONS "${VIRCADIA_BULLET_OPTIONS} -DCMAKE_CXX_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" -DCMAKE_C_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" ") - endif() -endif() - -message("Optimization options for Bullet: ${VIRCADIA_BULLET_OPTIONS}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} OPTIONS - -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON -DUSE_GLUT=0 - -DUSE_DX11=0 - -DBUILD_DEMOS=OFF -DBUILD_OPENGL3_DEMOS=OFF -DBUILD_BULLET3=OFF -DBUILD_BULLET2_DEMOS=OFF @@ -73,7 +43,10 @@ vcpkg_configure_cmake( -DBUILD_UNIT_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DINSTALL_LIBS=ON - ${VIRCADIA_BULLET_OPTIONS} + MAYBE_UNUSED_VARIABLES + -DBUILD_DEMOS=OFF + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON + -DUSE_DX11=0 ) vcpkg_install_cmake() diff --git a/cmake/ports/draco/portfile.cmake b/cmake/ports/draco/portfile.cmake index cc6e9e5f8f..76e90c1896 100644 --- a/cmake/ports/draco/portfile.cmake +++ b/cmake/ports/draco/portfile.cmake @@ -15,8 +15,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_LIBRARY_LINKAGE static) endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vircadia/draco diff --git a/cmake/ports/etc2comp/portfile.cmake b/cmake/ports/etc2comp/portfile.cmake index 1369492599..f37559bb8c 100644 --- a/cmake/ports/etc2comp/portfile.cmake +++ b/cmake/ports/etc2comp/portfile.cmake @@ -15,8 +15,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) set(VCPKG_CRT_LINKAGE dynamic) endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO vircadia/etc2comp diff --git a/cmake/ports/glad/portfile.cmake b/cmake/ports/glad/portfile.cmake index 6e3118b31e..6905d529f4 100644 --- a/cmake/ports/glad/portfile.cmake +++ b/cmake/ports/glad/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS) diff --git a/cmake/ports/gli/portfile.cmake b/cmake/ports/gli/portfile.cmake index 3052336198..c823601637 100644 --- a/cmake/ports/gli/portfile.cmake +++ b/cmake/ports/gli/portfile.cmake @@ -1,5 +1,4 @@ #header-only library -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/cmake/ports/glm/portfile.cmake b/cmake/ports/glm/portfile.cmake index 69ddd267cf..429384aa64 100644 --- a/cmake/ports/glm/portfile.cmake +++ b/cmake/ports/glm/portfile.cmake @@ -1,16 +1,10 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm REF 0.9.9.3 SHA512 44152ea6438763feda3b78813287fd59d3574a9630a41647a157825bf5ce4a18fbbecae5a5ccd94acc118ed3d42cbce53d3a67f25632d0c00ab77e7de2bb4650 HEAD_REF master -) - -vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_warnings_as_error.patch" + PATCHES "disable_warnings_as_error.patch" ) vcpkg_configure_cmake( diff --git a/cmake/ports/glslang/portfile.cmake b/cmake/ports/glslang/portfile.cmake index 72d62d26f3..6a5fe2b5bf 100644 --- a/cmake/ports/glslang/portfile.cmake +++ b/cmake/ports/glslang/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( @@ -13,7 +11,6 @@ vcpkg_from_github( vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS -DCMAKE_DEBUG_POSTFIX=d ) vcpkg_install_cmake() diff --git a/cmake/ports/hifi-scribe/portfile.cmake b/cmake/ports/hifi-scribe/portfile.cmake index 19d03b5db4..040f9649cd 100644 --- a/cmake/ports/hifi-scribe/portfile.cmake +++ b/cmake/ports/hifi-scribe/portfile.cmake @@ -1,5 +1,4 @@ set(VCPKG_POLICY_EMPTY_PACKAGE enabled) -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/cmake/ports/liblo/portfile.cmake b/cmake/ports/liblo/portfile.cmake index 27e41af186..0929e0b67a 100644 --- a/cmake/ports/liblo/portfile.cmake +++ b/cmake/ports/liblo/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO radarsat1/liblo diff --git a/cmake/ports/nlohmann-json/portfile.cmake b/cmake/ports/nlohmann-json/portfile.cmake index 5cee9565e8..e5b93de44e 100644 --- a/cmake/ports/nlohmann-json/portfile.cmake +++ b/cmake/ports/nlohmann-json/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(SOURCE_VERSION 3.3.0) vcpkg_download_distfile(HEADER diff --git a/cmake/ports/nvtt/portfile.cmake b/cmake/ports/nvtt/portfile.cmake index cf068a6db1..0addab5b9b 100644 --- a/cmake/ports/nvtt/portfile.cmake +++ b/cmake/ports/nvtt/portfile.cmake @@ -5,7 +5,6 @@ # CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # -include(vcpkg_common_functions) vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH diff --git a/cmake/ports/openexr/portfile.cmake b/cmake/ports/openexr/portfile.cmake index 72e1edb3e7..6e773434e8 100644 --- a/cmake/ports/openexr/portfile.cmake +++ b/cmake/ports/openexr/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(OPENEXR_VERSION 2.3.0) set(OPENEXR_HASH 268ae64b40d21d662f405fba97c307dad1456b7d996a447aadafd41b640ca736d4851d9544b4741a94e7b7c335fe6e9d3b16180e710671abfc0c8b2740b147b2) @@ -20,7 +18,6 @@ vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} OPTIONS -DOPENEXR_BUILD_PYTHON_LIBS=OFF -DOPENEXR_BUILD_VIEWERS=OFF - -DOPENEXR_ENABLE_TESTS=OFF -DOPENEXR_RUN_FUZZ_TESTS=OFF -DOPENEXR_BUILD_SHARED=${OPENEXR_SHARED} -DOPENEXR_BUILD_STATIC=${OPENEXR_STATIC} diff --git a/cmake/ports/openssl-android/portfile.cmake b/cmake/ports/openssl-android/portfile.cmake index fd74637d00..e33a325169 100644 --- a/cmake/ports/openssl-android/portfile.cmake +++ b/cmake/ports/openssl-android/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) set(OPENSSL_VERSION 1.1.0g) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) diff --git a/cmake/ports/openssl-unix/portfile.cmake b/cmake/ports/openssl-unix/portfile.cmake index 1047bdeecb..71e3fd05f0 100644 --- a/cmake/ports/openssl-unix/portfile.cmake +++ b/cmake/ports/openssl-unix/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) message(FATAL_ERROR "This port is only for openssl on Unix-like systems") endif() diff --git a/cmake/ports/openssl-windows/portfile.cmake b/cmake/ports/openssl-windows/portfile.cmake index edf826b4eb..3556827b6a 100644 --- a/cmake/ports/openssl-windows/portfile.cmake +++ b/cmake/ports/openssl-windows/portfile.cmake @@ -2,7 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME) message(FATAL_ERROR "This port is only for building openssl on Windows Desktop") endif() -include(vcpkg_common_functions) set(OPENSSL_VERSION 1.1.1h) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) diff --git a/cmake/ports/openvr/portfile.cmake b/cmake/ports/openvr/portfile.cmake index 76859b523b..46f652c8c4 100644 --- a/cmake/ports/openvr/portfile.cmake +++ b/cmake/ports/openvr/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO ValveSoftware/openvr diff --git a/cmake/ports/opus/portfile.cmake b/cmake/ports/opus/portfile.cmake index 988096ad62..72b566d3a1 100644 --- a/cmake/ports/opus/portfile.cmake +++ b/cmake/ports/opus/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH @@ -10,37 +8,13 @@ vcpkg_from_github( SHA512 590b852e966a497e33d129b58bc07d1205fe8fea9b158334cd8a3c7f539332ef9702bba4a37bd0be83eb5f04a218cef87645251899f099695d01c1eb8ea6e2fd HEAD_REF - master) + master +) -if(WIN32) - set(VIRCADIA_OPUS_OPTIONS "") -else() - if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt") - file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_OPTIMIZE.txt" VIRCADIA_OPTIMIZE) - endif() - if(EXISTS "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt") - file(READ "${VCPKG_ROOT_DIR}/_env/VIRCADIA_CPU_ARCHITECTURE.txt" VIRCADIA_CPU_ARCHITECTURE) - endif() - - if(VIRCADIA_OPTIMIZE) - set(VIRCADIA_OPUS_OPTIONS "-DCMAKE_BUILD_TYPE=Release") - else() - set(VIRCADIA_OPUS_OPTIONS "-DCMAKE_BUILD_TYPE=RelWithDebInfo") - endif() - - set(VIRCADIA_OPUS_OPTIONS "${VIRCADIA_OPUS_OPTIONS}") - - if(DEFINED VIRCADIA_CPU_ARCHITECTURE) - set(VIRCADIA_OPUS_OPTIONS "${VIRCADIA_OPUS_OPTIONS} -DCMAKE_CXX_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" -DCMAKE_C_FLAGS=\"${VIRCADIA_CPU_ARCHITECTURE}\" ") - endif() -endif() - -message("Optimization options for Opus: ${VIRCADIA_OPUS_OPTIONS}") vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA - OPTIONS ${VIRCADIA_OPUS_OPTIONS} ) vcpkg_install_cmake() diff --git a/cmake/ports/polyvox/portfile.cmake b/cmake/ports/polyvox/portfile.cmake index 9204b26dbd..2041daaba1 100644 --- a/cmake/ports/polyvox/portfile.cmake +++ b/cmake/ports/polyvox/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS) # else Linux desktop diff --git a/cmake/ports/quazip/portfile.cmake b/cmake/ports/quazip/portfile.cmake index 3f5703dcf4..9f70af0eea 100644 --- a/cmake/ports/quazip/portfile.cmake +++ b/cmake/ports/quazip/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - if(EXISTS "${VCPKG_ROOT_DIR}/_env/QT_CMAKE_PREFIX_PATH.txt") # This environment var file only exists if we're overridding the default Qt location, # which happens when using Qt from vcpkg, or using Qt from custom location diff --git a/cmake/ports/sdl2/portfile.cmake b/cmake/ports/sdl2/portfile.cmake index a84ad2f14d..342c6f39d7 100644 --- a/cmake/ports/sdl2/portfile.cmake +++ b/cmake/ports/sdl2/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO SDL-Mirror/SDL @@ -31,8 +29,9 @@ vcpkg_configure_cmake( -DSDL_STATIC=${SDL_STATIC} -DSDL_SHARED=${SDL_SHARED} -DVIDEO_VULKAN=${VULKAN_VIDEO} - -DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} -DLIBC=ON + MAYBE_UNUSED_VARIABLES + -DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} # Only available on MSVC ) vcpkg_install_cmake() diff --git a/cmake/ports/shaderc/portfile.cmake b/cmake/ports/shaderc/portfile.cmake index c43e591ec1..15924e998b 100644 --- a/cmake/ports/shaderc/portfile.cmake +++ b/cmake/ports/shaderc/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO google/shaderc diff --git a/cmake/ports/spirv-cross/portfile.cmake b/cmake/ports/spirv-cross/portfile.cmake index 6495e82bc3..fc2d677c76 100644 --- a/cmake/ports/spirv-cross/portfile.cmake +++ b/cmake/ports/spirv-cross/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/cmake/ports/spirv-tools/portfile.cmake b/cmake/ports/spirv-tools/portfile.cmake index b52a3b96c2..9b953edfa2 100644 --- a/cmake/ports/spirv-tools/portfile.cmake +++ b/cmake/ports/spirv-tools/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_from_github( diff --git a/cmake/ports/sranipal/portfile.cmake b/cmake/ports/sranipal/portfile.cmake index 4c4d88e567..e761e84bb4 100644 --- a/cmake/ports/sranipal/portfile.cmake +++ b/cmake/ports/sranipal/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) set(SRANIPAL_VERSION 1.1.0.1) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) diff --git a/cmake/ports/tbb/portfile.cmake b/cmake/ports/tbb/portfile.cmake index 76c881833f..ed3f7615cb 100644 --- a/cmake/ports/tbb/portfile.cmake +++ b/cmake/ports/tbb/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO oneapi-src/oneTBB @@ -118,6 +116,3 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") # Handle copyright file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright) - -vcpkg_test_cmake(PACKAGE_NAME TBB) -# diff --git a/cmake/ports/vhacd/portfile.cmake b/cmake/ports/vhacd/portfile.cmake index 4c74bb6532..0a0e80e37f 100644 --- a/cmake/ports/vhacd/portfile.cmake +++ b/cmake/ports/vhacd/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS) diff --git a/cmake/ports/vulkanmemoryallocator/portfile.cmake b/cmake/ports/vulkanmemoryallocator/portfile.cmake index 2b02bc1175..a48f5e1674 100644 --- a/cmake/ports/vulkanmemoryallocator/portfile.cmake +++ b/cmake/ports/vulkanmemoryallocator/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(SOURCE_VERSION 3.3.0) vcpkg_from_github( diff --git a/cmake/ports/webrtc/portfile.cmake b/cmake/ports/webrtc/portfile.cmake index 0986507e89..b6218d4d45 100644 --- a/cmake/ports/webrtc/portfile.cmake +++ b/cmake/ports/webrtc/portfile.cmake @@ -1,4 +1,3 @@ -include(vcpkg_common_functions) set(WEBRTC_VERSION 20210105) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) @@ -30,7 +29,7 @@ else () ) endif () -vcpkg_extract_source_archive(${WEBRTC_SOURCE_ARCHIVE}) +vcpkg_extract_source_archive(MASTER_COPY_SOURCE_PATH ARCHIVE ${WEBRTC_SOURCE_ARCHIVE} NO_REMOVE_ONE_LEVEL) file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/include DESTINATION ${CURRENT_PACKAGES_DIR}) file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/lib DESTINATION ${CURRENT_PACKAGES_DIR}) diff --git a/cmake/ports/zlib/portfile.cmake b/cmake/ports/zlib/portfile.cmake index 2069bd4857..3ed11d4470 100644 --- a/cmake/ports/zlib/portfile.cmake +++ b/cmake/ports/zlib/portfile.cmake @@ -1,5 +1,3 @@ -include(vcpkg_common_functions) - set(VERSION 1.2.12) vcpkg_download_distfile(ARCHIVE_FILE @@ -46,5 +44,3 @@ file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DI vcpkg_copy_pdbs() file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE) diff --git a/hifi_vcpkg.py b/hifi_vcpkg.py index 48d5645119..81188259fc 100644 --- a/hifi_vcpkg.py +++ b/hifi_vcpkg.py @@ -94,31 +94,27 @@ endif() if 'Windows' == system: self.exe = os.path.join(self.path, 'vcpkg.exe') self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.bat'), '-disableMetrics' ] - self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/vcpkg-win32-client-20210122.zip' + self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/vcpkg-windows_x86_64_2022.07.25.zip' self.vcpkgHash = '3df86b7d58c827bf08b3b7744f456f414b86a6d9bd58a507924103bc5a88f01ee495ce1f0fbf2f5b27f1ef6bfb1526e580ec13d3b9f87a89a462b3c50589fd6a' self.hostTriplet = 'x64-windows' if usePrebuilt: self.prebuiltArchive = self.assets_url + "/dependencies/vcpkg/builds/vcpkg-win32.zip%3FversionId=3SF3mDC8dkQH1JP041m88xnYmWNzZflx" elif 'Darwin' == system: self.exe = os.path.join(self.path, 'vcpkg') - self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh'), '--allowAppleClang', '-disableMetrics' ] - self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/builds/vcpkg-osx-client.tgz%3FversionId=j0b4azo_zTlH_Q9DElEWOz1UMYZ2nqQw' - self.vcpkgHash = '519d666d02ef22b87c793f016ca412e70f92e1d55953c8f9bd4ee40f6d9f78c1df01a6ee293907718f3bbf24075cc35492fb216326dfc50712a95858e9cbcb4d' + self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh'), '-disableMetrics' ] + self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/vcpkg-osx-x86_64-2022.06.16.1.tar.xz' + self.vcpkgHash = '4dfdb3d8c40440330d50b54073e59218334379d0cb3ca437252a29d3c8674c0eeeec9acd3927488a5ce96cbcdf411632d3576baf1e279181233209ec01761d1d' self.hostTriplet = 'x64-osx' - # Potential fix for a vcpkg build issue on OSX (see https://github.com/microsoft/vcpkg/issues/9029) - self.bootstrapEnv['CXXFLAGS'] = '-D_CTERMID_H_' - if usePrebuilt: - self.prebuiltArchive = self.assets_url + "/dependencies/vcpkg/builds/vcpkg-osx.tgz%3FversionId=6JrIMTdvpBF3MAsjA92BMkO79Psjzs6Z" elif 'Linux' == system and 'aarch64' == machine: self.exe = os.path.join(self.path, 'vcpkg') self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh'), '-disableMetrics' ] - self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/vcpkg-linux_aarch64_2021.05.12.tar.xz' + self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/vcpkg-linux_aarch64_2022.07.25.tar.xz' self.vcpkgHash = '7abb7aa96200e3cb5a6d0ec1c6ee63aa7886df2d1fecf8f9ee41ebe4d2cea0d4143274222c4941cb7aca61e4048229fdfe9eb2cd36dd559dd26db871a3b3ed61' self.hostTriplet = 'arm64-linux' else: self.exe = os.path.join(self.path, 'vcpkg') self.bootstrapCmds = [ os.path.join(self.path, 'bootstrap-vcpkg.sh'), '-disableMetrics' ] - self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/builds/vcpkg-linux-client.tgz%3FversionId=y7mct0gFicEXz5hJy3KROBugcLR56YWf' + self.vcpkgUrl = self.assets_url + '/dependencies/vcpkg/vcpkg-linux_amd64_2022.07.25.tar.xz' self.vcpkgHash = '6a1ce47ef6621e699a4627e8821ad32528c82fce62a6939d35b205da2d299aaa405b5f392df4a9e5343dd6a296516e341105fbb2dd8b48864781d129d7fba10d' self.hostTriplet = 'x64-linux' diff --git a/prebuild.py b/prebuild.py index 5483703cb7..d3c819489c 100644 --- a/prebuild.py +++ b/prebuild.py @@ -160,10 +160,11 @@ def main(): with timer('Setting up dependencies'): pm.setupDependencies(qt=qtInstallPath) - # wipe out the build directories (after writing the tag, since failure + # wipe out the build directories (after writing the tag, since failure # here shouldn't invalidate the vcpkg install) - with timer('Cleaning builds'): - pm.cleanBuilds() + if not args.vcpkg_skip_clean: + with timer('Cleaning builds'): + pm.cleanBuilds() # If we're running in android mode, we also need to grab a bunch of additional binaries # (this logic is all migrated from the old setupDependencies tasks in gradle)