diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2020-08-01 01:48:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-31 16:48:52 -0700 |
| commit | 5c66f720c0bc28071955e0c224075cae556bf286 (patch) | |
| tree | 718ec6d56b48c18d4bd9008505fcb469c39f163b /scripts | |
| parent | 56fffbe49dfb4dd8fae0940f272c5fd2b86be991 (diff) | |
| download | vcpkg-5c66f720c0bc28071955e0c224075cae556bf286.tar.gz vcpkg-5c66f720c0bc28071955e0c224075cae556bf286.zip | |
[cmake] Add cmake port to test qt (#10770)
* [cmake] add port for qt testing
* only add cmcldeps on windows
* [cmake] cleanup and fix portfile for osx build
* [cmake] more cleanup
* move cmake to scripts/test_ports
* add the overlay scripts/test_ports to ci
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/azure-pipelines/test-modified-ports.ps1 | 3 | ||||
| -rw-r--r-- | scripts/test_ports/cmake/CONTROL | 5 | ||||
| -rw-r--r-- | scripts/test_ports/cmake/portfile.cmake | 53 |
3 files changed, 60 insertions, 1 deletions
diff --git a/scripts/azure-pipelines/test-modified-ports.ps1 b/scripts/azure-pipelines/test-modified-ports.ps1 index 9a30321b4..27ff3290c 100755 --- a/scripts/azure-pipelines/test-modified-ports.ps1 +++ b/scripts/azure-pipelines/test-modified-ports.ps1 @@ -52,7 +52,8 @@ $commonArgs = @( '--binarycaching',
"--x-buildtrees-root=$buildtreesRoot",
"--x-install-root=$installRoot",
- "--x-packages-root=$packagesRoot"
+ "--x-packages-root=$packagesRoot",
+ "--overlay-ports=scripts/test_ports"
)
$binaryCachingMode = 'readwrite'
diff --git a/scripts/test_ports/cmake/CONTROL b/scripts/test_ports/cmake/CONTROL new file mode 100644 index 000000000..ba5848dbc --- /dev/null +++ b/scripts/test_ports/cmake/CONTROL @@ -0,0 +1,5 @@ +Source: cmake +Version: 3.17.2 +Build-Depends: qt5-base, qt5-winextras (windows), bzip2, expat, jsoncpp, liblzma, zlib, zstd, libarchive, curl, libuv, nghttp2 +Homepage: https://cmake.org/ +Description: CMake is an open-source, cross-platform family of tools designed to build, test and package software. diff --git a/scripts/test_ports/cmake/portfile.cmake b/scripts/test_ports/cmake/portfile.cmake new file mode 100644 index 000000000..9f41be53c --- /dev/null +++ b/scripts/test_ports/cmake/portfile.cmake @@ -0,0 +1,53 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.kitware.com/ + OUT_SOURCE_PATH SOURCE_PATH + REPO cmake/cmake + REF 615129f3ebd308abeaaee7f5f0689e7fc4616c28 + SHA512 5f02e05b7e6119c9c165c868d0679e0fbe5cc6b4f081a4e63a87d663c029bc378327ec042ae6bfd16bf48737bfaa5bae3be33a6dd33648e1f47cdc1a2370c366 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + #-DCMAKE_USE_SYSTEM_LIBRARIES=ON + -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON + -DCMAKE_USE_SYSTEM_CURL=ON + -DCMAKE_USE_SYSTEM_EXPAT=ON + -DCMAKE_USE_SYSTEM_ZLIB=ON + -DCMAKE_USE_SYSTEM_BZIP2=ON + -DCMAKE_USE_SYSTEM_ZSTD=ON + -DCMAKE_USE_SYSTEM_FORM=ON + -DCMAKE_USE_SYSTEM_JSONCPP=ON + -DCMAKE_USE_SYSTEM_LIBRHASH=OFF # not yet in VCPKG + -DCMAKE_USE_SYSTEM_LIBUV=ON + -DBUILD_QtDialog=ON # Just to test Qt with CMake +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_copy_pdbs() + +if(NOT VCPKG_TARGET_IS_OSX) + set(_tools cmake cmake-gui ctest cpack) + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND _tools cmcldeps) + endif() + vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN) +else() + # On OSX everything is within a CMake.app folder + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) + file(RENAME "${CURRENT_PACKAGES_DIR}/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/CMake.app") + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/CMake.app") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/debug) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/debug/CMake.app") + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
\ No newline at end of file |
