Merge pull request #5702 from kiwixz/pr/cmake_3_14

Update to cmake 3.14 (allow compilation with VS2019RC v142)
This commit is contained in:
Griffin Downs 2019-04-08 10:52:14 -07:00 committed by GitHub
commit b49c739129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 52 additions and 43 deletions

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -e
vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P)
. "$vcpkgRootDir/scripts/bootstrap.sh"

View File

@ -82,10 +82,10 @@ set(FOLLY_TARGETS_CMAKE "${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake
FILE(READ ${FOLLY_TARGETS_CMAKE} _contents)
STRING(REPLACE
[[
"Threads::Threads;Iphlpapi.lib;Ws2_32.lib;${_IMPORT_PREFIX}/lib/boost_context-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_chrono-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_date_time-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_filesystem-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_program_options-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_regex-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_system-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_thread-vc140-mt.lib;${_IMPORT_PREFIX}/lib/boost_atomic-vc140-mt.lib;${_IMPORT_PREFIX}/lib/double-conversion.lib;${_IMPORT_PREFIX}/lib/ssleay32.lib;${_IMPORT_PREFIX}/lib/libeay32.lib;${_IMPORT_PREFIX}/lib/zlib.lib;gflags;glog::glog;event"
"Threads::Threads;Iphlpapi.lib;Ws2_32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_context-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_context-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_chrono-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_chrono-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_date_time-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_date_time-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_filesystem-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_filesystem-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_program_options-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_program_options-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_regex-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_regex-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_system-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_system-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_thread-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_thread-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_atomic-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_atomic-vc140-mt-gd.lib>;${_IMPORT_PREFIX}/lib/double-conversion.lib;${_IMPORT_PREFIX}/lib/ssleay32.lib;${_IMPORT_PREFIX}/lib/libeay32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/zlib.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/zlibd.lib>;gflags;glog::glog;event"
]]
[[
"Threads::Threads;Iphlpapi.lib;Ws2_32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_context-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_context-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_chrono-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_chrono-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_date_time-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_date_time-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_filesystem-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_filesystem-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_program_options-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_program_options-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_regex-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_regex-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_system-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_system-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_thread-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_thread-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_atomic-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_atomic-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/double-conversion.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/double-conversion.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/ssleay32.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/ssleay32.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/libeay32.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/libeay32.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/zlib.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/zlibd.lib>;gflags;glog::glog;event"
"Threads::Threads;Iphlpapi.lib;Ws2_32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_context-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_context-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_chrono-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_chrono-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_date_time-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_date_time-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_filesystem-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_filesystem-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_program_options-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_program_options-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_regex-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_regex-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_system-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_system-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_thread-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_thread-vc140-mt-gd.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/boost_atomic-vc140-mt.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/boost_atomic-vc140-mt-gd.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/double-conversion.lib>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/double-conversion.lib>;${_IMPORT_PREFIX}/lib/ssleay32.lib;${_IMPORT_PREFIX}/lib/libeay32.lib;\$<\$<NOT:\$<CONFIG:DEBUG>>:${_IMPORT_PREFIX}/lib/zlib.lib>;\$<\$<CONFIG:DEBUG>:${_IMPORT_PREFIX}/debug/lib/zlibd.lib>;gflags;glog::glog;event"
]]
_contents "${_contents}")
FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}")

View File

@ -1,3 +1,3 @@
Source: libmodbus
Version: 3.1.4-1
Version: 3.1.4-2
Description: libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol

View File

@ -24,3 +24,5 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake")
# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodbus RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.0)
project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX)
find_package(odb 2.4.0 REQUIRED COMPONENTS libodb)
find_package(sqlite3 REQUIRED)
find_package(sqlite3 CONFIG)
configure_file(config.unix.h.in
${CMAKE_CURRENT_SOURCE_DIR}/odb/sqlite/details/config.h COPYONLY)

View File

@ -1,4 +1,4 @@
Source: libodb-sqlite
Version: 2.4.0-1
Version: 2.4.0-2
Description: Sqlite support for the ODB ORM library
Build-Depends: libodb, sqlite3

View File

@ -1,3 +1,3 @@
Source: openssl-windows
Version: 1.0.2q
Version: 1.0.2q-1
Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library.

View File

@ -20,10 +20,11 @@ vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE
vcpkg_extract_source_archive(${OPENSSL_SOURCE_ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${MASTER_COPY_SOURCE_PATH}
PATCHES ${CMAKE_CURRENT_LIST_DIR}/ConfigureIncludeQuotesFix.patch
${CMAKE_CURRENT_LIST_DIR}/STRINGIFYPatch.patch
${CMAKE_CURRENT_LIST_DIR}/EnableWinARM32.patch
${CMAKE_CURRENT_LIST_DIR}/EmbedSymbolsInStaticLibsZ7.patch
PATCHES
ConfigureIncludeQuotesFix.patch
STRINGIFYPatch.patch
EnableWinARM32.patch
EmbedSymbolsInStaticLibsZ7.patch
)
vcpkg_find_acquire_program(NASM)

View File

@ -16,7 +16,7 @@ index 4a3e492..f7e22a5 100644
# TODO NOCOMMIT
-#find_package(sqlite3)
+find_package(sqlite3 REQUIRED)
+find_package(sqlite3 CONFIG)
+target_link_libraries(SQLiteCpp PRIVATE sqlite3)
#if(sqlite3_VERSION VERSION_LESS "3.19")
# set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")

View File

@ -1,4 +1,4 @@
Source: sqlitecpp
Version: 2.2
Version: 2.2-1
Build-Depends: sqlite3
Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.

View File

@ -23,6 +23,7 @@ vcpkg_configure_cmake(
-DSQLITECPP_RUN_CPPCHECK=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
-DSQLITE_ENABLE_COLUMN_METADATA=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
)
vcpkg_install_cmake()

View File

@ -59,6 +59,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
else()
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy)
endif()
file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef)
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}")
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}")

View File

@ -78,7 +78,7 @@ vcpkgCheckEqualFileHash()
echo " File path: [ $downloadPath ]"
echo " Expected hash: [ $sha512 ]"
echo " Actual hash: [ $actualHash ]"
exit
exit 1
fi
}
@ -234,8 +234,8 @@ buildDir="$vcpkgRootDir/toolsrc/build.rel"
rm -rf "$buildDir"
mkdir -p "$buildDir"
(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics")
(cd "$buildDir" && "$cmakeExe" --build .)
(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics") || exit 1
(cd "$buildDir" && "$cmakeExe" --build .) || exit 1
rm -rf "$vcpkgRootDir/vcpkg"
cp "$buildDir/vcpkg" "$vcpkgRootDir/"

View File

@ -109,16 +109,20 @@ function(vcpkg_configure_cmake)
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141")
set(GENERATOR "Visual Studio 15 2017")
set(ARCH "ARM64")
elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v142")
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
set(VCPKG_CMAKE_SYSTEM_NAME Windows)
endif()
message(FATAL_ERROR
"Unable to determine appropriate CMake MSBuild generator for: ${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}.
This is because CMake 3.12.4 does not currently have a 'Visual Studio 16 2019' option.
This can be worked around by either:
1. Install Visual Studio 2017 Stable
")
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(GENERATOR "Visual Studio 16 2019")
set(ARCH "Win32")
elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(GENERATOR "Visual Studio 16 2019")
set(ARCH "x64")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(GENERATOR "Visual Studio 16 2019")
set(ARCH "ARM")
elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v142")
set(GENERATOR "Visual Studio 16 2019")
set(ARCH "ARM64")
else()
if(NOT VCPKG_CMAKE_SYSTEM_NAME)
set(VCPKG_CMAKE_SYSTEM_NAME Windows)

View File

@ -1,25 +1,25 @@
<?xml version="1.0"?>
<tools version="2">
<tool name="cmake" os="windows">
<version>3.12.4</version>
<exeRelativePath>cmake-3.12.4-win32-x86\bin\cmake.exe</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-win32-x86.zip</url>
<sha512>ca7097c5917101c39d5fa5325cd256ad3aa616a7e5811915cb2869c24961dc133726015b3576908fbd0666f89c8e31886bed9cf6b532a3fe44681d5245bc25c7</sha512>
<archiveName>cmake-3.12.4-win32-x86.zip</archiveName>
<version>3.14.0</version>
<exeRelativePath>cmake-3.14.0-win32-x86\bin\cmake.exe</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-win32-x86.zip</url>
<sha512>60eb6a0790883da4152a957bd1133405f620f4b7a073af3bea97695b3ef8c22c41d9b90e45815f2a896df5be0cd6dedb73a6df5f17a42761ca8f457c9f3b708c</sha512>
<archiveName>cmake-3.14.0-win32-x86.zip</archiveName>
</tool>
<tool name="cmake" os="osx">
<version>3.12.4</version>
<exeRelativePath>cmake-3.12.4-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Darwin-x86_64.tar.gz</url>
<sha512>67ce23394d9679818ab0f2792f5d585c8c6f385e18584d488a47d48b768d1ee20b58247d22945aeff1ff9f84b7e843457dac98a50801ac3068ab1fbcbe0b0f45</sha512>
<archiveName>cmake-3.12.4-Darwin-x86_64.tar.gz</archiveName>
<version>3.14.0</version>
<exeRelativePath>cmake-3.14.0-Darwin-x86_64/CMake.app/Contents/bin/cmake</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Darwin-x86_64.tar.gz</url>
<sha512>a5a7217a049be3bb2ef5c93292b1d92eb4dd5ec6ab2dd04984aae01d2732eb343cea4f9741b333a5e21a27eb7934f568f780f3558e7ff870150c3309fc4656b3</sha512>
<archiveName>cmake-3.14.0-Darwin-x86_64.tar.gz</archiveName>
</tool>
<tool name="cmake" os="linux">
<version>3.12.4</version>
<exeRelativePath>cmake-3.12.4-Linux-x86_64/bin/cmake</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Linux-x86_64.tar.gz</url>
<sha512>ee9eded0c72e06ef99554f09553d40842478700ca6f07319c28247f1d45301708c703c65ad617cf618833257bacc3b9f63a54b32288bfb619d38758669dcd20f</sha512>
<archiveName>cmake-3.12.4-Linux-x86_64.tar.gz</archiveName>
<version>3.14.0</version>
<exeRelativePath>cmake-3.14.0-Linux-x86_64/bin/cmake</exeRelativePath>
<url>https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz</url>
<sha512>e687c0f3acfb15c880ddac67e2821907f833cb900c6ecedb4ab5df5102604d82753c948e3c7dca6e5bcce6278a09b7d577b1afade2e133aec5b2057ac48d3c74</sha512>
<archiveName>cmake-3.14.0-Linux-x86_64.tar.gz</archiveName>
</tool>
<tool name="cmake" os="freebsd">
<version>3.12.4</version>