Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade vcpkg submodule and handle fallout. #1041

Merged
merged 1 commit into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ find_package(OpenSSL REQUIRED)
find_package(Opus)
find_package(PhysX REQUIRED)
find_package(PNG REQUIRED)
find_package(Python3 3.8 REQUIRED Interpreter Development)
find_package(Python3 3.8 REQUIRED COMPONENTS Interpreter Development)
find_package(Speex)
find_package(string_theory 2.0 REQUIRED)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Ports/python3-cairosvg/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(INSTALLED_PYTHON_PREFIX "${CURRENT_INSTALLED_DIR}/tools/python3")
# We are running in script mode, so no toolchains are available. Sad.
find_program(
PYTHON_EXECUTABLE
NAMES python python3 python3.9
NAMES python python3 python3.10
PATHS "${INSTALLED_PYTHON_PREFIX}"
NO_DEFAULT_PATH
)
Expand All @@ -28,7 +28,7 @@ vcpkg_execute_in_download_mode(
OUTPUT_VARIABLE INSTALLED_PYTHON_PREFIX
)
vcpkg_execute_in_download_mode(
COMMAND "${PYTHON_EXECUTABLE}" -c "import sys,distutils.sysconfig;sys.stdout.write(distutils.sysconfig.get_python_lib(plat_specific=False,standard_lib=False))"
COMMAND "${PYTHON_EXECUTABLE}" -c [[import sys,sysconfig;sys.stdout.write(sysconfig.get_path("purelib"))]]
WORKING_DIRECTORY "${INSTALLED_PYTHON_PREFIX}"
OUTPUT_VARIABLE INSTALLED_SITE_PACKAGES_DIR
)
Expand Down
3 changes: 2 additions & 1 deletion Scripts/Ports/python3-cairosvg/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dependencies": [
{
"name": "cairo",
"platform": "windows"
"platform": "windows",
"default-features": false
},
"python3"
]
Expand Down
5 changes: 5 additions & 0 deletions Scripts/Triplets/x64-windows-plasma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ if(PORT IN_LIST _PLASMA_DYNAMIC_LIBRARIES)
else()
set(VCPKG_LIBRARY_LINKAGE static)
endif()

# This is a terrible hack because meson seems to suck.
if(PORT STREQUAL cairo)
set(VCPKG_BUILD_TYPE release)
endif()
5 changes: 5 additions & 0 deletions Scripts/Triplets/x86-windows-plasma.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ if(PORT IN_LIST _PLASMA_DYNAMIC_LIBRARIES)
else()
set(VCPKG_LIBRARY_LINKAGE static)
endif()

# This is a terrible hack because meson seems to suck.
if(PORT STREQUAL cairo)
set(VCPKG_BUILD_TYPE release)
endif()
18 changes: 18 additions & 0 deletions cmake/Findlibwebm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ find_path(libwebm_INCLUDE_DIR NAMES libwebm/mkvparser.hpp)
find_library(libwebm_LIBRARY_RELEASE NAMES webm libwebm)
find_library(libwebm_LIBRARY_DEBUG NAMES webmd libwebmd)

# Cope with vcpkg no longer renaming the debug library. This is needed due to MSVC's STL iterators
# not being ABI compatible from debug to release mode.
if(libwebm_LIBRARY_RELEASE AND NOT libwebm_LIBRARY_DEBUG)
foreach(prefix_path IN LISTS CMAKE_PREFIX_PATH)
if(prefix_path MATCHES "[Dd][Ee][Bb][Uu][Gg]\/?$")
list(APPEND _debug_paths "${prefix_path}")
endif()
if(_debug_paths)
find_library(libwebm_LIBRARY_DEBUG
NAMES webm libwebm webmd libwembd
PATHS ${_debug_paths}
PATH_SUFFIXES lib
NO_CMAKE_PATH
)
endif()
endforeach()
endif()

select_library_configurations(libwebm)
find_package_handle_standard_args(libwebm REQUIRED_VARS libwebm_INCLUDE_DIR libwebm_LIBRARY)

Expand Down
7 changes: 7 additions & 0 deletions cmake/VcpkgToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ if(_HOST_IS_WINDOWS AND NOT DEFINED VCPKG_TARGET_TRIPLET)
endif()
endif()

# Default to using the same triplet for the host and target to prevent unnesecary
# dependencies on cross-compilers when we're just building a Win32 static engine
# on a Win64 machine.
if(_HOST_IS_WINDOWS AND NOT DEFINED VCPKG_HOST_TRIPLET)
set(VCPKG_HOST_TRIPLET ${VCPKG_TARGET_TRIPLET} CACHE STRING "")
endif()

# Workaround: The cairocffi Python module does not ship with libcairo-2.dll as expected. So,
# we're going to opt-into a special manifest feature to install the vcpkg cairo.dll into
# the python3 port. BUT only if PLASMA_BUILD_RESOURCE_DAT has not been explicitly turned OFF
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 2806 files