Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
21 changes: 11 additions & 10 deletions ports/ffmpeg/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-4.1)

vcpkg_download_distfile(ARCHIVE
URLS "http://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2"
FILENAME "ffmpeg-4.1.tar.bz2"
SHA512 ccf6d07268dc47e08ca619eb182a003face2a8ee73ec1a28157330dd7de1df88939def1fc1c7e6b6ac7b59752cdad84657d589b2fafb73e14e5ef03fb6e33417
)

vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF 4.1
PATCHES
create-lib-libraries.patch
detect-openssl.patch
configure_opencv.patch
)

if (${SOURCE_PATH} MATCHES " ")
message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces")
endif()

vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/create-lib-libraries.patch
${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch
${CMAKE_CURRENT_LIST_DIR}/configure_opencv.patch
)

vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")
Expand Down
11 changes: 6 additions & 5 deletions ports/icu/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ vcpkg_download_distfile(
FILENAME "icu4c-${VERSION2}-src.tgz"
SHA512 4c37691246db802e4bae0c8c5f6ac1dac64c5753b607e539c5c1c36e361fcd9dd81bd1d3b5416c2960153b83700ccdb356412847d0506ab7782ae626ac0ffb94
)
vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src/icu-${VERSION})

vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch
${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
disable-escapestr-tool.patch
remove-MD-from-configure.patch
)

set(CONFIGURE_OPTIONS "--disable-samples --disable-tests")
Expand Down
2 changes: 1 addition & 1 deletion ports/liblemon/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ vcpkg_extract_source_archive_ex(
"cmake.patch"
"fixup-targets.patch"
)

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
Expand Down
10 changes: 6 additions & 4 deletions ports/libvpx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(vcpkg_common_functions)
set(LIBVPX_VERSION 1.7.0)
set(LIBVPX_HASH 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0)

set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libvpx-${LIBVPX_VERSION})
# set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libvpx-${LIBVPX_VERSION})

string(REGEX REPLACE "\\\\" "/" SOURCE_PATH_UNIX ${SOURCE_PATH})
string(REGEX REPLACE "\\\\" "/" CURRENT_PACKAGES_DIR_UNIX ${CURRENT_PACKAGES_DIR})
Expand All @@ -18,9 +18,11 @@ vcpkg_download_distfile(ARCHIVE
FILENAME "libvpx-${LIBVPX_VERSION}.tar.gz"
SHA512 ${LIBVPX_HASH}
)
vcpkg_extract_source_archive(${ARCHIVE})

vcpkg_find_acquire_program(YASM)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${LIBVPX_VERSION}
)
vcpkg_find_acquire_program(PERL)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES make)
vcpkg_acquire_msys(MSYS_ROOT PACKAGES diffutils)
Expand Down
2 changes: 1 addition & 1 deletion ports/ms-angle/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: ms-angle
Version: 2018-04-18
Version: 2018-04-18-1
Description: The UWP version of a conformant OpenGL ES implementation for Windows, Mac and Linux.
The goal of ANGLE is to allow users of multiple operating systems to seamlessly run WebGL and other OpenGL ES content by translating OpenGL ES API calls to one of the hardware-supported APIs available for that platform. ANGLE currently provides translation from OpenGL ES 2.0 and 3.0 to desktop OpenGL, OpenGL ES, Direct3D 9, and Direct3D 11. Support for translation from OpenGL ES to Vulkan is underway, and future plans include compute shader support (ES 3.1) and MacOS support.
8 changes: 3 additions & 5 deletions ports/ms-angle/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()

vcpkg_from_github(
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO microsoft/angle
REF ms-master
SHA512 eecdb7012c0630b24fde540fb6a558f4ee5326fc1218773b779953d0fe0ef02da68ceb2577822cfc0374392a88b871201bfe291e3b85c3dd005edc83f84fec1f
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/001-fix-uwp.patch
PATCHES
001-fix-uwp.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
Expand Down
9 changes: 1 addition & 8 deletions ports/nmap/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${SQLITE_VERSION}
)

vcpkg_extract_source_archive(${ARCHIVE})

vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/detect-crypto-library.patch
detect-crypto-library.patch
)

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
Expand Down
2 changes: 1 addition & 1 deletion ports/ogdf/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ vcpkg_configure_cmake(
-DOGDF_INSTALL_LIBRARY_DIR:STRING=lib
-DOGDF_INSTALL_CMAKE_DIR:STRING=lib/cmake/OGDF
)

vcpkg_install_cmake()

vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OGDF)
Expand Down
1 change: 1 addition & 0 deletions ports/openssl-unix/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAM
endif()

include(vcpkg_common_functions)

set(OPENSSL_VERSION 1.0.2q)

vcpkg_find_acquire_program(PERL)
Expand Down
2 changes: 1 addition & 1 deletion ports/vxl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_EXAMPLES=OFF
Expand Down
8 changes: 7 additions & 1 deletion scripts/cmake/vcpkg_acquire_msys.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
endif()

set(PATH_TO_ROOT ${TOOLPATH}/${TOOLSUBPATH})

if(NOT EXISTS "${TOOLPATH}/${STAMP}")

message(STATUS "Acquiring MSYS2...")
Expand All @@ -95,6 +94,13 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
)
file(WRITE "${TOOLPATH}/${STAMP}" "0")
message(STATUS "Acquiring MSYS2... OK")

# Remove database lock
SET(DB_LOCK_PATH ${PATH_TO_ROOT}/var/lib/pacman/db.lck)
if (EXISTS "${DB_LOCK_PATH}")
message(STATUS "${DB_LOCK_PATH} exists --- deleting it")
file(REMOVE "${DB_LOCK_PATH}")
endif()
endif()

if(_am_PACKAGES)
Expand Down
8 changes: 5 additions & 3 deletions scripts/cmake/vcpkg_configure_cmake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,15 @@ This can be worked around by either:

if(DEFINED VCPKG_CMAKE_SYSTEM_NAME)
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}")
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
set(VCPKG_CMAKE_SYSTEM_VERSION 10.0)
endif()
endif()
if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION)
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}")
endif()
if(DEFINED VCPKG_CMAKE_SYSTEM_PROCESSOR)
list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_PROCESSOR=${VCPKG_CMAKE_SYSTEM_PROCESSOR}")
endif()

list(APPEND _csc_OPTIONS "-DVCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}")

if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON)
Expand Down
11 changes: 11 additions & 0 deletions scripts/toolchains/linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ if(NOT _VCPKG_LINUX_TOOLCHAIN)
set(_VCPKG_LINUX_TOOLCHAIN 1)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")

if (NOT CMAKE_SYSTEM_PROCESSOR)
# TODO: This should be replaced with a switch on VCPKG_TARGET_ARCHITECTURE once we know what linux systems "natively" define for each of the targets
set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE STRING "")
message("CMAKE_HOST_SYSTEM_PROCESSOR is ${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
else()
if (NOT CMAKE_SYSTEM_PROCESSOR)
set(CMAKE_SYSTEM_PROCESSOR "x86_64" CACHE STRING "")
message("CMAKE_HOST_SYSTEM_PROCESSOR defaulted to x86_64")
endif()
endif()
set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")

Expand Down
20 changes: 20 additions & 0 deletions scripts/toolchains/windows.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "")
endif()

if (NOT CMAKE_SYSTEM_PROCESSOR)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
set(CMAKE_SYSTEM_PROCESSOR ARM CACHE STRING "")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
set(CMAKE_SYSTEM_PROCESSOR ARM64 CACHE STRING "")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
set(CMAKE_SYSTEM_PROCESSOR AMD64 CACHE STRING "")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
set(CMAKE_SYSTEM_PROCESSOR X86 CACHE STRING "")
elseif(NOT VCPKG_TARGET_ARCHITECTURE)
message(STATUS "VCPKG_TARGET_ARCHITECTURE is not set")
else()
message(FATAL_ERROR "Unknow target architecture: ${VCPKG_TARGET_ARCHITECTURE}")
endif()
endif()

get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE )
if(NOT _CMAKE_IN_TRY_COMPILE)

Expand Down
5 changes: 5 additions & 0 deletions toolsrc/src/vcpkg/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,11 @@ namespace vcpkg::Build
hash += "-";
hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "android.cmake", "SHA1");
}
else if (pre_build_info.cmake_system_name.empty() || pre_build_info.cmake_system_name == "WindowsStore")
{
hash += "-";
hash += Hash::get_file_hash(fs, paths.scripts / "toolchains" / "windows.cmake", "SHA1");
}

s_hash_cache.emplace(triplet_file_path, hash);
return hash;
Expand Down