mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-26 01:30:55 +08:00
[3fd|python3] switch to vcpkg-msbuild (#33026)
* [python3] switch to vcpkg-msbuild * v db * update 3fd to use vcpkg-msbuild as a sanity check * Fix windows cross builds * v db * arm needs another patch * v db * 3fd uwp msbuild_install * v db
This commit is contained in:
parent
28de7389db
commit
27276976ca
@ -13,18 +13,16 @@ vcpkg_from_github(
|
||||
)
|
||||
|
||||
# Build:
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP:
|
||||
vcpkg_install_msbuild(
|
||||
if (VCPKG_TARGET_IS_UWP) # UWP:
|
||||
vcpkg_msbuild_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PROJECT_SUBPATH "3FD/3FD.WinRT.UWP.vcxproj"
|
||||
USE_VCPKG_INTEGRATION
|
||||
)
|
||||
elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32:
|
||||
vcpkg_install_msbuild(
|
||||
elseif (VCPKG_TARGET_IS_WINDOWS) # Win32:
|
||||
vcpkg_msbuild_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PROJECT_SUBPATH "3FD/3FD.vcxproj"
|
||||
TARGET Build
|
||||
USE_VCPKG_INTEGRATION
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!")
|
||||
@ -34,24 +32,24 @@ endif()
|
||||
file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/3FD/*.h")
|
||||
file(INSTALL
|
||||
${HEADER_FILES}
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/include/3FD"
|
||||
PATTERN "*_impl*.h" EXCLUDE
|
||||
PATTERN "*example*.h" EXCLUDE
|
||||
PATTERN "stdafx.h" EXCLUDE
|
||||
PATTERN "targetver.h" EXCLUDE
|
||||
)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/btree DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
|
||||
file(INSTALL ${SOURCE_PATH}/OpenCL/CL DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD)
|
||||
file(INSTALL "${SOURCE_PATH}/btree" DESTINATION "${CURRENT_PACKAGES_DIR}/include/3FD")
|
||||
file(INSTALL "${SOURCE_PATH}/OpenCL/CL" DESTINATION "${CURRENT_PACKAGES_DIR}/include/3FD")
|
||||
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/3FD)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/3FD")
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/3FD/3fd-config-template.xml
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD
|
||||
"${SOURCE_PATH}/3FD/3fd-config-template.xml"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/3FD"
|
||||
)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd)
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
file(INSTALL "${SOURCE_PATH}/Acknowledgements.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/3fd")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "3fd",
|
||||
"version": "2.6.3",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "C++ Framework For Fast Development",
|
||||
"supports": "windows & !static & !arm64",
|
||||
"dependencies": [
|
||||
@ -18,6 +18,11 @@
|
||||
"platform": "windows"
|
||||
},
|
||||
"rapidxml",
|
||||
"sqlite3"
|
||||
"sqlite3",
|
||||
{
|
||||
"name": "vcpkg-msbuild",
|
||||
"host": true,
|
||||
"platform": "windows"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
13
ports/python3/0015-dont-use-WINDOWS-def.patch
Normal file
13
ports/python3/0015-dont-use-WINDOWS-def.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/PC/launcher.c b/PC/launcher.c
|
||||
index 734e75333..7124927cf 100644
|
||||
--- a/PC/launcher.c
|
||||
+++ b/PC/launcher.c
|
||||
@@ -2015,7 +2015,7 @@ installed, use -0 for available pythons", &p[1]);
|
||||
return rc;
|
||||
}
|
||||
|
||||
-#if defined(_WINDOWS)
|
||||
+#if !defined(_CONSOLE) // _WINDOWS is defined by the vcpkg toolchain
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
LPWSTR lpstrCmd, int nShow)
|
34
ports/python3/0016-fix-win-cross.patch
Normal file
34
ports/python3/0016-fix-win-cross.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj
|
||||
index 7d3423251f..7f607742fe 100644
|
||||
--- a/PCbuild/_freeze_module.vcxproj
|
||||
+++ b/PCbuild/_freeze_module.vcxproj
|
||||
@@ -366,7 +366,7 @@
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<Target Name="_RebuildGetPath" AfterTargets="_RebuildFrozen" Condition="$(Configuration) != 'PGUpdate'">
|
||||
- <Exec Command='"$(TargetPath)" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' />
|
||||
+ <Exec Command='"_freeze_module.exe" "%(GetPath.ModName)" "%(GetPath.FullPath)" "%(GetPath.IntFile)"' />
|
||||
|
||||
<Copy SourceFiles="%(GetPath.IntFile)"
|
||||
DestinationFiles="%(GetPath.OutFile)"
|
||||
@@ -378,7 +378,7 @@
|
||||
Condition="'@(_UpdatedGetPath)' != ''" Importance="high" />
|
||||
</Target>
|
||||
<Target Name="_RebuildFrozen" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGUpdate'">
|
||||
- <Exec Command='"$(TargetPath)" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
|
||||
+ <Exec Command='"_freeze_module.exe" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
|
||||
|
||||
<Copy SourceFiles="%(None.IntFile)"
|
||||
DestinationFiles="%(None.OutFile)"
|
||||
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
|
||||
index c49a8533ad..b1cdf7c8d7 100644
|
||||
--- a/PCbuild/pcbuild.proj
|
||||
+++ b/PCbuild/pcbuild.proj
|
||||
@@ -14,6 +14,6 @@
|
||||
<ItemDefinitionGroup>
|
||||
<FreezeProjects>
|
||||
- <Platform>$(PreferredToolArchitecture)</Platform>
|
||||
+ <Platform>$(Platform)</Platform>
|
||||
<Configuration>$(Configuration)</Configuration>
|
||||
<Configuration Condition="$(Configuration) == 'PGInstrument'">Release</Configuration>
|
||||
<Properties></Properties>
|
@ -10,5 +10,14 @@
|
||||
${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
</Link>
|
||||
<Lib>
|
||||
<AdditionalDependencies>Crypt32.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(IncludeExternals)'=='Release|true'">
|
||||
${CRYPTO_RELEASE};${SSL_RELEASE};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(IncludeExternals)'=='Debug|true'">
|
||||
${CRYPTO_DEBUG};${SSL_DEBUG};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
|
@ -17,6 +17,7 @@ set(PATCHES
|
||||
0010-dont-skip-rpath.patch
|
||||
0012-force-disable-curses.patch
|
||||
0014-fix-get-python-inc-output.patch
|
||||
0015-dont-use-WINDOWS-def.patch
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
@ -24,7 +25,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
endif()
|
||||
|
||||
# Fix build failures with GCC for built-in modules (https://github.com/microsoft/vcpkg/issues/26573)
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
list(APPEND PATCHES 0011-gcc-ldflags-fix.patch)
|
||||
endif()
|
||||
|
||||
@ -37,13 +38,16 @@ elseif(VCPKG_TARGET_IS_WINDOWS AND CMAKE_SYSTEM_VERSION EQUAL 6.1)
|
||||
message(FATAL_ERROR "python3 requires the feature deprecated-win7-support when building on Windows 7.")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PYTHON_ALLOW_EXTENSIONS)
|
||||
# The Windows 11 SDK has a problem that causes it to error on the resource files, so we patch that.
|
||||
vcpkg_get_windows_sdk(WINSDK_VERSION)
|
||||
if("${WINSDK_VERSION}" VERSION_GREATER_EQUAL "10.0.22000")
|
||||
list(APPEND PATCHES "0007-workaround-windows-11-sdk-rc-compiler-error.patch")
|
||||
endif()
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
list(APPEND PATCHES "0016-fix-win-cross.patch")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_from_github(
|
||||
@ -94,20 +98,25 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
find_library(SQLITE_DEBUG NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
find_library(SSL_RELEASE NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(SSL_DEBUG NAMES libssl PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
list(APPEND add_libs_rel "${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE}")
|
||||
list(APPEND add_libs_dbg "${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG}")
|
||||
else()
|
||||
message(STATUS "WARNING: Static builds of Python will not have C extension modules available.")
|
||||
endif()
|
||||
find_library(ZLIB_RELEASE NAMES zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
|
||||
find_library(ZLIB_DEBUG NAMES zlib zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
|
||||
list(APPEND add_libs_rel "${ZLIB_RELEASE}")
|
||||
list(APPEND add_libs_dbg "${ZLIB_DEBUG}")
|
||||
|
||||
configure_file("${SOURCE_PATH}/PC/pyconfig.h" "${SOURCE_PATH}/PC/pyconfig.h")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/python_vcpkg.props.in" "${SOURCE_PATH}/PCbuild/python_vcpkg.props")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.props.in" "${SOURCE_PATH}/PCbuild/openssl.props")
|
||||
file(WRITE "${SOURCE_PATH}/PCbuild/libffi.props"
|
||||
"<?xml version='1.0' encoding='utf-8'?>
|
||||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' />"
|
||||
"<?xml version='1.0' encoding='utf-8'?>"
|
||||
"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003' />"
|
||||
)
|
||||
|
||||
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DVCPKG_SET_CHARSET_FLAG=OFF")
|
||||
if(PYTHON_ALLOW_EXTENSIONS)
|
||||
set(OPTIONS
|
||||
"/p:IncludeExtensions=true"
|
||||
@ -137,27 +146,29 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND OPTIONS "/p:_VcpkgPythonLinkage=StaticLibrary")
|
||||
endif()
|
||||
|
||||
# _freeze_importlib.exe is run as part of the build process, so make sure the required dynamic libs are available.
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/bin")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}/debug/bin")
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
set(ENV{PythonForBuild} "${PYTHON3_DIR}/python.exe") # PythonForBuild is what's used on windows, despite the readme
|
||||
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/manual-tools/${PORT}")
|
||||
endif()
|
||||
|
||||
vcpkg_find_acquire_program(PYTHON3)
|
||||
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
|
||||
set(ENV{PythonForBuild} "${PYTHON3_DIR}/python.exe") # PythonForBuild is what's used on windows, despite the readme
|
||||
|
||||
vcpkg_install_msbuild(
|
||||
vcpkg_msbuild_install(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PROJECT_SUBPATH "PCbuild/pcbuild.proj"
|
||||
ADD_BIN_TO_PATH
|
||||
OPTIONS ${OPTIONS}
|
||||
LICENSE_SUBPATH "LICENSE"
|
||||
TARGET_PLATFORM_VERSION "${WINSDK_VERSION}"
|
||||
SKIP_CLEAN
|
||||
ADDITIONAL_LIBS_RELEASE ${add_libs_rel}
|
||||
ADDITIONAL_LIBS_DEBUG ${add_libs_dbg}
|
||||
)
|
||||
|
||||
if(NOT VCPKG_CROSSCOMPILING)
|
||||
file(GLOB_RECURSE freeze_module "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/PCbuild/**/_freeze_module.exe")
|
||||
file(COPY "${freeze_module}" DESTINATION "${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/manual-tools/${PORT}")
|
||||
endif()
|
||||
|
||||
# The extension modules must be placed in the DLLs directory, so we can't use vcpkg_copy_tools()
|
||||
if(PYTHON_ALLOW_EXTENSIONS)
|
||||
file(GLOB_RECURSE PYTHON_EXTENSIONS_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.pyd")
|
||||
@ -203,8 +214,6 @@ if(VCPKG_TARGET_IS_WINDOWS)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_clean_msbuild()
|
||||
|
||||
# Remove static library belonging to executable
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
if (EXISTS "${CURRENT_PACKAGES_DIR}/lib/python.lib")
|
||||
@ -277,8 +286,6 @@ else()
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Perform some post-build checks on modules
|
||||
@ -302,6 +309,8 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
||||
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage" usage)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
if(PYTHON_ALLOW_EXTENSIONS)
|
||||
|
@ -8,11 +8,6 @@
|
||||
<AdditionalIncludeDirectories>
|
||||
%(AdditionalIncludeDirectories);${CURRENT_INSTALLED_DIR}/include
|
||||
</AdditionalIncludeDirectories>
|
||||
|
||||
<RuntimeLibrary Condition="'${VCPKG_CRT_LINKAGE}|$(Configuration)' == 'static|Debug'">MultiThreadedDebug</RuntimeLibrary>
|
||||
<RuntimeLibrary Condition="'${VCPKG_CRT_LINKAGE}|$(Configuration)' == 'static|Release'">MultiThreaded</RuntimeLibrary>
|
||||
<RuntimeLibrary Condition="'${VCPKG_CRT_LINKAGE}|$(Configuration)' == 'dynamic|Debug'">MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<RuntimeLibrary Condition="'${VCPKG_CRT_LINKAGE}|$(Configuration)' == 'dynamic|Release'">MultiThreadedDLL</RuntimeLibrary>
|
||||
</CLCompile>
|
||||
<Link>
|
||||
<!-- Required Libs -->
|
||||
@ -36,6 +31,22 @@
|
||||
<!-- Required to prevent linker errors on Visual Studio 2017 with static CRT -->
|
||||
<TargetMachine Condition="'${VCPKG_TARGET_ARCHITECTURE}'=='x86'">MachineX86</TargetMachine>
|
||||
<TargetMachine Condition="'${VCPKG_TARGET_ARCHITECTURE}'=='x64'">MachineX64</TargetMachine>
|
||||
<TargetMachine Condition="'${VCPKG_TARGET_ARCHITECTURE}'=='arm'">MachineARM</TargetMachine>
|
||||
<!-- Required Libs -->
|
||||
<AdditionalDependencies Condition="'$(Configuration)'=='Release'">
|
||||
${ZLIB_RELEASE};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)'=='Debug'">
|
||||
${ZLIB_DEBUG};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
|
||||
<!-- Extension modules -->
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(IncludeExtensions)' == 'Release|true'">
|
||||
${BZ2_RELEASE};${EXPAT_RELEASE};${FFI_RELEASE};${LZMA_RELEASE};${SQLITE_RELEASE};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(IncludeExtensions)' == 'Debug|true'">
|
||||
${BZ2_DEBUG};${EXPAT_DEBUG};${FFI_DEBUG};${LZMA_DEBUG};${SQLITE_DEBUG};%(AdditionalDependencies)
|
||||
</AdditionalDependencies>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "python3",
|
||||
"version": "3.11.4",
|
||||
"port-version": 1,
|
||||
"description": "The Python programming language",
|
||||
"homepage": "https://github.com/python/cpython",
|
||||
"license": "Python-2.0",
|
||||
@ -43,6 +44,11 @@
|
||||
"name": "sqlite3",
|
||||
"platform": "!(windows & static)"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-msbuild",
|
||||
"host": true,
|
||||
"platform": "windows"
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vcpkg-msbuild",
|
||||
"version-date": "2023-06-22",
|
||||
"version-date": "2023-08-08",
|
||||
"documentation": "https://vcpkg.io/en/docs/README.html",
|
||||
"license": "MIT",
|
||||
"supports": "native & windows",
|
||||
|
@ -2,11 +2,15 @@ function(vcpkg_msbuild_install)
|
||||
cmake_parse_arguments(
|
||||
PARSE_ARGV 0
|
||||
"arg"
|
||||
"CLEAN;NO_TOOLCHAIN_PROPS;NO_INSTALL"
|
||||
"CLEAN;NO_TOOLCHAIN_PROPS;NO_INSTALL;ADD_BIN_TO_PATH"
|
||||
"SOURCE_PATH;PROJECT_SUBPATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;TARGET"
|
||||
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;DEPENDENT_PKGCONFIG;ADDITIONAL_LIBS;ADDITIONAL_LIBS_DEBUG;ADDITIONAL_LIBS_RELEASE"
|
||||
)
|
||||
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
set(arg_ADD_BIN_TO_PATH OFF)
|
||||
endif()
|
||||
|
||||
if(DEFINED arg_UNPARSED_ARGUMENTS)
|
||||
message(WARNING "${CMAKE_CURRENT_FUNCTION} was passed extra arguments: ${arg_UNPARSED_ARGUMENTS}")
|
||||
endif()
|
||||
@ -53,7 +57,7 @@ function(vcpkg_msbuild_install)
|
||||
DEPENDENT_PKGCONFIG ${arg_DEPENDENT_PKGCONFIG}
|
||||
ADDITIONAL_LIBS_DEBUG ${arg_ADDITIONAL_LIBS_DEBUG}
|
||||
ADDITIONAL_LIBS_RELEASE ${arg_ADDITIONAL_LIBS_RELEASE})
|
||||
list(APPEND arg_OPTIONS
|
||||
list(APPEND arg_OPTIONS
|
||||
"/p:ForceImportAfterCppProps=${props_file}"
|
||||
"/p:ForceImportAfterCppTargets=${target_file}"
|
||||
)
|
||||
@ -69,6 +73,7 @@ function(vcpkg_msbuild_install)
|
||||
"-maxCpuCount:${VCPKG_CONCURRENCY}"
|
||||
# other Properties
|
||||
"/p:Platform=${arg_PLATFORM}"
|
||||
"/p:PlatformTarget=${TRIPLET_SYSTEM_ARCH}"
|
||||
"/p:PlatformToolset=${arg_PLATFORM_TOOLSET}"
|
||||
"/p:WindowsTargetPlatformVersion=${arg_TARGET_PLATFORM_VERSION}"
|
||||
# vcpkg properties
|
||||
@ -88,6 +93,14 @@ function(vcpkg_msbuild_install)
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
message(STATUS "Building ${arg_PROJECT_SUBPATH} for Release")
|
||||
if(arg_ADD_BIN_TO_PATH)
|
||||
vcpkg_backup_env_variables(VARS PATH)
|
||||
if("${build_type}" STREQUAL "debug")
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin")
|
||||
else()
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin")
|
||||
endif()
|
||||
endif()
|
||||
set(working_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
file(REMOVE_RECURSE "${working_dir}")
|
||||
file(MAKE_DIRECTORY "${working_dir}")
|
||||
@ -115,10 +128,21 @@ function(vcpkg_msbuild_install)
|
||||
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
||||
endif()
|
||||
endif()
|
||||
if(arg_ADD_BIN_TO_PATH)
|
||||
vcpkg_restore_env_variables(VARS PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
message(STATUS "Building ${arg_PROJECT_SUBPATH} for Debug")
|
||||
if(arg_ADD_BIN_TO_PATH)
|
||||
vcpkg_backup_env_variables(VARS PATH)
|
||||
if("${build_type}" STREQUAL "debug")
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin")
|
||||
else()
|
||||
vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin")
|
||||
endif()
|
||||
endif()
|
||||
set(working_dir "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
file(REMOVE_RECURSE "${working_dir}")
|
||||
file(MAKE_DIRECTORY "${working_dir}")
|
||||
@ -141,6 +165,9 @@ function(vcpkg_msbuild_install)
|
||||
file(COPY ${dlls} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
endif()
|
||||
if(arg_ADD_BIN_TO_PATH)
|
||||
vcpkg_restore_env_variables(VARS PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "81e9fd75ff6a4fee6ab7a5d4d09e7e3a735fbaaa",
|
||||
"version": "2.6.3",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "0bfff492ed0b9ee3f31bb7593443572bc0fcf2d4",
|
||||
"version": "2.6.3",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"default": {
|
||||
"3fd": {
|
||||
"baseline": "2.6.3",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"7zip": {
|
||||
"baseline": "22.01",
|
||||
@ -6602,7 +6602,7 @@
|
||||
},
|
||||
"python3": {
|
||||
"baseline": "3.11.4",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"qca": {
|
||||
"baseline": "2.3.5",
|
||||
@ -8509,7 +8509,7 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"vcpkg-msbuild": {
|
||||
"baseline": "2023-06-22",
|
||||
"baseline": "2023-08-08",
|
||||
"port-version": 0
|
||||
},
|
||||
"vcpkg-pkgconfig-get-modules": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "531061b4485adebb80364473d227b0edf4ee8ed9",
|
||||
"version": "3.11.4",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "1ed9aa74ea44d2e4457410ad732d165317c6f8aa",
|
||||
"version": "3.11.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "09443e951188f7850761144fde77fe9edf0dceba",
|
||||
"version-date": "2023-08-08",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "e9effc7e0ed636888b0bf3660d602f0737cba97e",
|
||||
"version-date": "2023-06-22",
|
||||
|
Loading…
x
Reference in New Issue
Block a user