[qcustomplot] Install unofficial CMake config files (#54613)

This commit is contained in:
Daniele E. Domenichelli authored and GitHub committed 2026-10-27 15:19:25 -07:00
1 parent 98cada8368
commit 866e9e258a
5 files changed
+86 -37

No files matched your search

+44 -34
View File
@@ -1,34 +1,44 @@
vcpkg_download_distfile(ARCHIVE
URLS "https://www.qcustomplot.com/release/${VERSION}/QCustomPlot.tar.gz"
FILENAME "QCustomPlot-${VERSION}.tar.gz"
SHA512 2e49a9b3f7ab03bcd580e5f3c3ae0d5e8c57d3ccce0ceed9862cde7ea23e2f3672a963af988be60e504cb5aa50bc462e4b28acf577eae41cc6fea2802642dc19
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.qcustomplot.com/release/${VERSION}/QCustomPlot-sharedlib.tar.gz"
FILENAME "QCustomPlot-sharedlib-${VERSION}.tar.gz"
SHA512 c661e4a835066fee92b254fbd7b825dbd5c58973189ff2099a01308cb81fe6bf3bac1456f5da91f01c6265f8f548f61b57e237d00a9b5c2c94acf1a024baa18e
)
vcpkg_extract_source_archive(
SharedLib_SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
config.patch
)
file(RENAME "${SharedLib_SOURCE_PATH}" "${SOURCE_PATH}/qcustomplot-sharedlib")
vcpkg_qmake_configure(
SOURCE_PATH "${SOURCE_PATH}/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro"
QMAKE_OPTIONS
"${OSX_OPTIONS}"
)
vcpkg_qmake_install()
vcpkg_copy_pdbs()
# Handle copyright
configure_file(${SOURCE_PATH}/GPL.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.qcustomplot.com/release/${VERSION}/QCustomPlot.tar.gz"
FILENAME "QCustomPlot-${VERSION}.tar.gz"
SHA512 2e49a9b3f7ab03bcd580e5f3c3ae0d5e8c57d3ccce0ceed9862cde7ea23e2f3672a963af988be60e504cb5aa50bc462e4b28acf577eae41cc6fea2802642dc19
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.qcustomplot.com/release/${VERSION}/QCustomPlot-sharedlib.tar.gz"
FILENAME "QCustomPlot-sharedlib-${VERSION}.tar.gz"
SHA512 c661e4a835066fee92b254fbd7b825dbd5c58973189ff2099a01308cb81fe6bf3bac1456f5da91f01c6265f8f548f61b57e237d00a9b5c2c94acf1a024baa18e
)
vcpkg_extract_source_archive(
SharedLib_SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
config.patch
)
file(RENAME "${SharedLib_SOURCE_PATH}" "${SOURCE_PATH}/qcustomplot-sharedlib")
vcpkg_qmake_configure(
SOURCE_PATH "${SOURCE_PATH}/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro"
QMAKE_OPTIONS
"${OSX_OPTIONS}"
)
vcpkg_qmake_install()
vcpkg_copy_pdbs()
# Upstream does not provide a CMake config
configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-qcustomplot-config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/unofficial-qcustomplot/unofficial-qcustomplot-config.cmake" @ONLY)
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${CURRENT_PACKAGES_DIR}/share/unofficial-qcustomplot/unofficial-qcustomplot-config-version.cmake"
VERSION "${VERSION}"
COMPATIBILITY SameMajorVersion
)
# Handle copyright
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/GPL.txt")
@@ -0,0 +1,31 @@
include(CMakeFindDependencyMacro)
find_dependency(Qt6 COMPONENTS Widgets PrintSupport)
if(NOT TARGET unofficial::qcustomplot::qcustomplot)
get_filename_component(_qcustomplot_prefix "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE)
# On Windows, the DLL import library names include the major version
find_library(QCUSTOMPLOT_LIBRARY_RELEASE NAMES qcustomplot qcustomplot2 PATHS "${_qcustomplot_prefix}/lib" NO_DEFAULT_PATH REQUIRED)
find_library(QCUSTOMPLOT_LIBRARY_DEBUG NAMES qcustomplotd qcustomplotd2 PATHS "${_qcustomplot_prefix}/debug/lib" NO_DEFAULT_PATH)
add_library(unofficial::qcustomplot::qcustomplot UNKNOWN IMPORTED)
set_target_properties(unofficial::qcustomplot::qcustomplot PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_qcustomplot_prefix}/include"
INTERFACE_LINK_LIBRARIES "Qt6::Widgets;Qt6::PrintSupport"
IMPORTED_CONFIGURATIONS RELEASE
IMPORTED_LOCATION_RELEASE "${QCUSTOMPLOT_LIBRARY_RELEASE}"
)
if(QCUSTOMPLOT_LIBRARY_DEBUG)
set_property(TARGET unofficial::qcustomplot::qcustomplot APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(unofficial::qcustomplot::qcustomplot PROPERTIES
IMPORTED_LOCATION_DEBUG "${QCUSTOMPLOT_LIBRARY_DEBUG}"
)
endif()
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "dynamic")
set_target_properties(unofficial::qcustomplot::qcustomplot PROPERTIES
INTERFACE_COMPILE_DEFINITIONS QCUSTOMPLOT_USE_LIBRARY
)
endif()
unset(_qcustomplot_prefix)
endif()
+5 -2
View File
@@ -1,7 +1,7 @@
{
"name": "qcustomplot",
"version": "2.1.1",
"port-version": 1,
"port-version": 2,
"description": "QCustomPlot is a Qt C++ widget for plotting and data visualization.",
"homepage": "https://www.qcustomplot.com/",
"license": "GPL-3.0-or-later",
@@ -9,7 +9,10 @@
"dependencies": [
{
"name": "qtbase",
"default-features": false
"default-features": false,
"features": [
"widgets"
]
},
{
"name": "vcpkg-qmake",
+1 -1
View File
@@ -8298,7 +8298,7 @@
},
"qcustomplot": {
"baseline": "2.1.1",
"port-version": 1
"port-version": 2
},
"qdldl": {
"baseline": "0.1.9",
+5
View File
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "9b13f9cda0c67986cbb41c69948072f633643906",
"version": "2.1.1",
"port-version": 2
},
{
"git-tree": "9777b7a98f80b51511f9a266053ff1373c5aee72",
"version": "2.1.1",