Skip to content

Commit

Permalink
Fix more ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Neumann-A committed Jan 8, 2025
1 parent 9c8db0b commit 3fd9721
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions ports/icu/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../" IGNORE_UNCHANGED)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_HOST_INSTALLED_DIR}" "`dirname $0`/../../../../${_HOST_TRIPLET}/" IGNORE_UNCHANGED)

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
4 changes: 4 additions & 0 deletions ports/libgcrypt/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ if(NOT VCPKG_CROSSCOMPILING)
endif()

set(install_prefix "${CURRENT_INSTALLED_DIR}")
set(host_install_prefix "${CURRENT_HOST_INSTALLED_DIR}")
if(VCPKG_HOST_IS_WINDOWS)
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" install_prefix "${install_prefix}")
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" host_install_prefix "${host_install_prefix}")
endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/libgcrypt-config" "${install_prefix}" "`dirname $0`/../../..")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/libgcrypt-config" "${host_install_prefix}" "`dirname $0`/../../../../${_HOST_TRIPLET}")
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/libgcrypt-config" "${install_prefix}" "`dirname $0`/../../../..")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/libgcrypt-config" "${host_install_prefix}" "`dirname $0`/../../../../../${_HOST_TRIPLET}")
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_AR=llvm-ar.exe")
set(ENV{AR} "llvm-ar.exe")
14 changes: 5 additions & 9 deletions triplets/x64-win-llvm/x64-win-llvm-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,15 @@ if(NOT _VCPKG_WINDOWS_TOOLCHAIN)
message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"")
endif()

set(CHARSET_FLAG "/utf-8")
if (NOT VCPKG_SET_CHARSET_FLAG OR VCPKG_PLATFORM_TOOLSET MATCHES "v120")
# VS 2013 does not support /utf-8
set(CHARSET_FLAG " /utf-8")
if (NOT VCPKG_SET_CHARSET_FLAG)
set(CHARSET_FLAG "")
endif()

set(MP_BUILD_FLAG "")
if(NOT (CMAKE_CXX_COMPILER MATCHES "clang-cl.exe"))
set(MP_BUILD_FLAG "/MP ")
endif()
set(common_flags "/nologo /DWIN32 /D_WINDOWS -Wno-implicit-function-declaration${CHARSET_FLAG}")

set(CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS ${CHARSET_FLAG} /GR /EHsc ${MP_BUILD_FLAG}${VCPKG_CXX_FLAGS}" CACHE STRING "")
set(CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS ${CHARSET_FLAG} ${MP_BUILD_FLAG}${VCPKG_C_FLAGS}" CACHE STRING "")
set(CMAKE_CXX_FLAGS "${common_flags} /GR /EHsc ${VCPKG_CXX_FLAGS}" CACHE STRING "")
set(CMAKE_C_FLAGS "${common_flags} ${VCPKG_C_FLAGS}" CACHE STRING "")

if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64ec")
string(APPEND CMAKE_CXX_FLAGS " /arm64EC /D_AMD64_ /DAMD64 /D_ARM64EC_ /DARM64EC")
Expand Down
2 changes: 2 additions & 0 deletions triplets/x64-win-msvc/port-customization/quickfast.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set(ENV{CMAKE_WINDOWS_KITS_10_DIR} "$ENV{WindowsSdkDir}")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_POLICY_DEFAULT_CMP0149=NEW")

0 comments on commit 3fd9721

Please sign in to comment.