Update VCPKG deprecations and fix compiler flags for bullet3 and opus being overwritten.

VCPKG sets CMAKE_CXX_FLAGS and CMAKE_C_FLAGS automatically; Apparently our code to set those flags has never worked and rather than ignoring most of it, it changed to putting it somewhere it doesn't belong.
This commit is contained in:
Julian Groß 2022-08-15 22:39:16 +02:00
parent 3b07b1699e
commit a6a889a2ed
30 changed files with 10 additions and 119 deletions

View file

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
set(ARISTO_VERSION 0.8.1) set(ARISTO_VERSION 0.8.1)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)

View file

@ -13,8 +13,6 @@
# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm) # VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
# #
include(vcpkg_common_functions)
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(WARNING "Dynamic not supported, building static") message(WARNING "Dynamic not supported, building static")
@ -31,40 +29,12 @@ vcpkg_from_github(
PATCHES "bullet-git-fix-build-clang-8.patch" 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( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
OPTIONS OPTIONS
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON
-DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON
-DUSE_GLUT=0 -DUSE_GLUT=0
-DUSE_DX11=0
-DBUILD_DEMOS=OFF
-DBUILD_OPENGL3_DEMOS=OFF -DBUILD_OPENGL3_DEMOS=OFF
-DBUILD_BULLET3=OFF -DBUILD_BULLET3=OFF
-DBUILD_BULLET2_DEMOS=OFF -DBUILD_BULLET2_DEMOS=OFF
@ -73,7 +43,10 @@ vcpkg_configure_cmake(
-DBUILD_UNIT_TESTS=OFF -DBUILD_UNIT_TESTS=OFF
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
-DINSTALL_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() vcpkg_install_cmake()

View file

@ -15,8 +15,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static)
endif() endif()
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO vircadia/draco REPO vircadia/draco

View file

@ -15,8 +15,6 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_CRT_LINKAGE dynamic)
endif() endif()
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO vircadia/etc2comp REPO vircadia/etc2comp

View file

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS) file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)

View file

@ -1,5 +1,4 @@
#header-only library #header-only library
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH

View file

@ -1,16 +1,10 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO g-truc/glm REPO g-truc/glm
REF 0.9.9.3 REF 0.9.9.3
SHA512 44152ea6438763feda3b78813287fd59d3574a9630a41647a157825bf5ce4a18fbbecae5a5ccd94acc118ed3d42cbce53d3a67f25632d0c00ab77e7de2bb4650 SHA512 44152ea6438763feda3b78813287fd59d3574a9630a41647a157825bf5ce4a18fbbecae5a5ccd94acc118ed3d42cbce53d3a67f25632d0c00ab77e7de2bb4650
HEAD_REF master HEAD_REF master
) PATCHES "disable_warnings_as_error.patch"
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/disable_warnings_as_error.patch"
) )
vcpkg_configure_cmake( vcpkg_configure_cmake(

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(
@ -13,7 +11,6 @@ vcpkg_from_github(
vcpkg_configure_cmake( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA PREFER_NINJA
OPTIONS -DCMAKE_DEBUG_POSTFIX=d
) )
vcpkg_install_cmake() vcpkg_install_cmake()

View file

@ -1,5 +1,4 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO radarsat1/liblo REPO radarsat1/liblo

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
set(SOURCE_VERSION 3.3.0) set(SOURCE_VERSION 3.3.0)
vcpkg_download_distfile(HEADER vcpkg_download_distfile(HEADER

View file

@ -5,7 +5,6 @@
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT} # CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET} # CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
# #
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
set(OPENEXR_VERSION 2.3.0) set(OPENEXR_VERSION 2.3.0)
set(OPENEXR_HASH 268ae64b40d21d662f405fba97c307dad1456b7d996a447aadafd41b640ca736d4851d9544b4741a94e7b7c335fe6e9d3b16180e710671abfc0c8b2740b147b2) set(OPENEXR_HASH 268ae64b40d21d662f405fba97c307dad1456b7d996a447aadafd41b640ca736d4851d9544b4741a94e7b7c335fe6e9d3b16180e710671abfc0c8b2740b147b2)
@ -20,7 +18,6 @@ vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}
OPTIONS OPTIONS
-DOPENEXR_BUILD_PYTHON_LIBS=OFF -DOPENEXR_BUILD_PYTHON_LIBS=OFF
-DOPENEXR_BUILD_VIEWERS=OFF -DOPENEXR_BUILD_VIEWERS=OFF
-DOPENEXR_ENABLE_TESTS=OFF
-DOPENEXR_RUN_FUZZ_TESTS=OFF -DOPENEXR_RUN_FUZZ_TESTS=OFF
-DOPENEXR_BUILD_SHARED=${OPENEXR_SHARED} -DOPENEXR_BUILD_SHARED=${OPENEXR_SHARED}
-DOPENEXR_BUILD_STATIC=${OPENEXR_STATIC} -DOPENEXR_BUILD_STATIC=${OPENEXR_STATIC}

View file

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
set(OPENSSL_VERSION 1.1.0g) set(OPENSSL_VERSION 1.1.0g)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) 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") message(FATAL_ERROR "This port is only for openssl on Unix-like systems")
endif() endif()

View file

@ -2,7 +2,6 @@ if(VCPKG_CMAKE_SYSTEM_NAME)
message(FATAL_ERROR "This port is only for building openssl on Windows Desktop") message(FATAL_ERROR "This port is only for building openssl on Windows Desktop")
endif() endif()
include(vcpkg_common_functions)
set(OPENSSL_VERSION 1.1.1h) set(OPENSSL_VERSION 1.1.1h)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION}) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/openssl-${OPENSSL_VERSION})

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO ValveSoftware/openvr REPO ValveSoftware/openvr

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH OUT_SOURCE_PATH
SOURCE_PATH SOURCE_PATH
@ -10,37 +8,13 @@ vcpkg_from_github(
SHA512 SHA512
590b852e966a497e33d129b58bc07d1205fe8fea9b158334cd8a3c7f539332ef9702bba4a37bd0be83eb5f04a218cef87645251899f099695d01c1eb8ea6e2fd 590b852e966a497e33d129b58bc07d1205fe8fea9b158334cd8a3c7f539332ef9702bba4a37bd0be83eb5f04a218cef87645251899f099695d01c1eb8ea6e2fd
HEAD_REF 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( vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH} SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA PREFER_NINJA
OPTIONS ${VIRCADIA_OPUS_OPTIONS}
) )
vcpkg_install_cmake() vcpkg_install_cmake()

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS) file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)
# else Linux desktop # else Linux desktop

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
if(EXISTS "${VCPKG_ROOT_DIR}/_env/QT_CMAKE_PREFIX_PATH.txt") 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, # 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 # which happens when using Qt from vcpkg, or using Qt from custom location

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO SDL-Mirror/SDL REPO SDL-Mirror/SDL
@ -31,8 +29,9 @@ vcpkg_configure_cmake(
-DSDL_STATIC=${SDL_STATIC} -DSDL_STATIC=${SDL_STATIC}
-DSDL_SHARED=${SDL_SHARED} -DSDL_SHARED=${SDL_SHARED}
-DVIDEO_VULKAN=${VULKAN_VIDEO} -DVIDEO_VULKAN=${VULKAN_VIDEO}
-DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT}
-DLIBC=ON -DLIBC=ON
MAYBE_UNUSED_VARIABLES
-DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} # Only available on MSVC
) )
vcpkg_install_cmake() vcpkg_install_cmake()

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO google/shaderc REPO google/shaderc

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github( vcpkg_from_github(

View file

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
set(SRANIPAL_VERSION 1.1.0.1) set(SRANIPAL_VERSION 1.1.0.1)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO oneapi-src/oneTBB REPO oneapi-src/oneTBB
@ -118,6 +116,3 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}")
# Handle copyright # Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) 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) file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright)
vcpkg_test_cmake(PACKAGE_NAME TBB)
#

View file

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS) file(READ "${VCPKG_ROOT_DIR}/_env/EXTERNAL_BUILD_ASSETS.txt" EXTERNAL_BUILD_ASSETS)

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
set(SOURCE_VERSION 3.3.0) set(SOURCE_VERSION 3.3.0)
vcpkg_from_github( vcpkg_from_github(

View file

@ -1,4 +1,3 @@
include(vcpkg_common_functions)
set(WEBRTC_VERSION 20210105) set(WEBRTC_VERSION 20210105)
set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src)
@ -30,7 +29,7 @@ else ()
) )
endif () 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/include DESTINATION ${CURRENT_PACKAGES_DIR})
file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/lib DESTINATION ${CURRENT_PACKAGES_DIR}) file(COPY ${MASTER_COPY_SOURCE_PATH}/webrtc/lib DESTINATION ${CURRENT_PACKAGES_DIR})

View file

@ -1,5 +1,3 @@
include(vcpkg_common_functions)
set(VERSION 1.2.12) set(VERSION 1.2.12)
vcpkg_download_distfile(ARCHIVE_FILE vcpkg_download_distfile(ARCHIVE_FILE
@ -46,5 +44,3 @@ file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DI
vcpkg_copy_pdbs() vcpkg_copy_pdbs()
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE)