mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 05:53:22 +08:00
[qwt] update to 6.2.1 and add CMake config (#35522)
* update port. * update versions. * add unofficial target config (uses qmake build outputs). * update versions file. * formatting. * fix typo. * try again. * resolve comments. * update versions. * fix. * update versions file. * Add include. * update versions file. --------- Co-authored-by: Nick D'Ademo <dademo.n@duerr-ndt.com>
This commit is contained in:
parent
0da40a8b53
commit
b2a65e780a
@ -1,32 +1,33 @@
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
URL "https://git.code.sf.net/p/qwt/git"
|
||||
REF "06d6822b595b70c9fd567a4fe0d835759bf271fe"
|
||||
FETCH_REF qwt-6.2
|
||||
PATCHES
|
||||
config.patch
|
||||
fix_dll_install.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" IS_DYNAMIC)
|
||||
set(OPTIONS "")
|
||||
if(IS_DYNAMIC)
|
||||
set(OPTIONS "QWT_CONFIG+=QwtDll")
|
||||
endif()
|
||||
vcpkg_qmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
QMAKE_OPTIONS
|
||||
${OPTIONS}
|
||||
"CONFIG-=debug_and_release"
|
||||
"CONFIG+=create_prl"
|
||||
"CONFIG+=link_prl"
|
||||
)
|
||||
vcpkg_qmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
URL "https://git.code.sf.net/p/qwt/git"
|
||||
REF "907846e0e981b216349156ee83b13208faae2934"
|
||||
FETCH_REF qwt-6.2
|
||||
PATCHES
|
||||
config.patch
|
||||
fix_dll_install.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" IS_DYNAMIC)
|
||||
set(OPTIONS "")
|
||||
if(IS_DYNAMIC)
|
||||
list(APPEND OPTIONS "QWT_CONFIG+=QwtDll")
|
||||
endif()
|
||||
vcpkg_qmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
QMAKE_OPTIONS
|
||||
${OPTIONS}
|
||||
"CONFIG-=debug_and_release"
|
||||
"CONFIG+=create_prl"
|
||||
"CONFIG+=link_prl"
|
||||
)
|
||||
vcpkg_qmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-qwt-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-qwt")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
48
ports/qwt/unofficial-qwt-config.cmake
Normal file
48
ports/qwt/unofficial-qwt-config.cmake
Normal file
@ -0,0 +1,48 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(NOT TARGET unofficial::qwt::qwt)
|
||||
find_dependency(Qt6 COMPONENTS Core Gui Widgets Svg OpenGL Concurrent PrintSupport OpenGLWidgets)
|
||||
|
||||
find_file(qwt_LIBRARY_RELEASE_DLL NAMES qwt.dll PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin" NO_DEFAULT_PATH)
|
||||
find_file(qwt_LIBRARY_DEBUG_DLL NAMES qwtd.dll PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/bin" NO_DEFAULT_PATH)
|
||||
|
||||
if(EXISTS "${qwt_LIBRARY_RELEASE_DLL}")
|
||||
add_library(unofficial::qwt::qwt SHARED IMPORTED)
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES INTERFACE_COMPILE_DEFINITIONS QWT_DLL)
|
||||
set_property(TARGET unofficial::qwt::qwt APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
|
||||
find_library(qwt_LIBRARY_RELEASE NAMES qwt PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH REQUIRED)
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES IMPORTED_IMPLIB_RELEASE "${qwt_LIBRARY_RELEASE}")
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES IMPORTED_LOCATION_RELEASE "${qwt_LIBRARY_RELEASE_DLL}")
|
||||
if(EXISTS "${qwt_LIBRARY_DEBUG_DLL}")
|
||||
set_property(TARGET unofficial::qwt::qwt APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
|
||||
find_library(qwt_LIBRARY_DEBUG NAMES qwtd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH REQUIRED)
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES IMPORTED_IMPLIB_DEBUG "${qwt_LIBRARY_DEBUG}")
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES IMPORTED_LOCATION_DEBUG "${qwt_LIBRARY_DEBUG_DLL}")
|
||||
endif()
|
||||
else()
|
||||
add_library(unofficial::qwt::qwt UNKNOWN IMPORTED)
|
||||
find_library(qwt_LIBRARY_RELEASE NAMES qwt PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH)
|
||||
if(EXISTS "${qwt_LIBRARY_RELEASE}")
|
||||
set_property(TARGET unofficial::qwt::qwt APPEND PROPERTY IMPORTED_CONFIGURATIONS "Release")
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES IMPORTED_LOCATION_RELEASE "${qwt_LIBRARY_RELEASE}")
|
||||
endif()
|
||||
find_library(qwt_LIBRARY_DEBUG NAMES qwtd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH)
|
||||
if(EXISTS "${qwt_LIBRARY_DEBUG}")
|
||||
set_property(TARGET unofficial::qwt::qwt APPEND PROPERTY IMPORTED_CONFIGURATIONS "Debug")
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES IMPORTED_LOCATION_DEBUG "${qwt_LIBRARY_DEBUG}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(unofficial::qwt::qwt PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include"
|
||||
)
|
||||
target_link_libraries(unofficial::qwt::qwt
|
||||
INTERFACE
|
||||
Qt::Widgets
|
||||
Qt::Svg
|
||||
Qt::Concurrent
|
||||
Qt::PrintSupport
|
||||
Qt::OpenGL
|
||||
Qt::OpenGLWidgets
|
||||
)
|
||||
endif()
|
@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "qwt",
|
||||
"version": "6.2.0+20220616",
|
||||
"port-version": 1,
|
||||
"description": "qt widgets library for technical applications",
|
||||
"version-date": "2023-05-12",
|
||||
"description": "Widgets library for technical applications",
|
||||
"homepage": "https://sourceforge.net/projects/qwt",
|
||||
"license": null,
|
||||
"dependencies": [
|
||||
|
@ -7309,8 +7309,8 @@
|
||||
"port-version": 3
|
||||
},
|
||||
"qwt": {
|
||||
"baseline": "6.2.0+20220616",
|
||||
"port-version": 1
|
||||
"baseline": "2023-05-12",
|
||||
"port-version": 0
|
||||
},
|
||||
"qwtw": {
|
||||
"baseline": "3.1.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a1e2a09246f114b613350042641546934ea0ff27",
|
||||
"version-date": "2023-05-12",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "1b200939b471ac5ff1f02f62ed38715d4efc6df8",
|
||||
"version": "6.2.0+20220616",
|
||||
|
Loading…
x
Reference in New Issue
Block a user