vcpkg/ports/qt5-base/vcpkg-cmake-wrapper.cmake

80 lines
3.3 KiB
CMake
Raw Normal View History

_find_package(${ARGS})
function(add_qt_library _target)
foreach(_lib IN LISTS ARGN)
[qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (#9260) * Fix static qt5 builds and ignore system qmake closes #9234 and #9239 * fix angle conflict and icu dependency * add egl-registry as a dependency * remove space * adding spaces resolved the problem * move files only if they exist * Update the Wrapper to use the Postgres target fixes some observed linkage issues * update baseline * add fontconfig on linux so CI is less flaky in a full rebuild * fix linkage dependent qt5-imageformats libs * Fix Wrapper for Linux and add other platform libs to Qt5::Core * fix plugin properties in cmake files * fix cmake files. * fix missing plugin qminimal deployment into tools dir * change wrapper slightly * UNIX also means APPLE so it needs to be excluded * fix the static windows build * mark the parts of fixcmake which require further work to work with single configuration builds * Update ci.baseline.txt make qt5-tools pass for CI testing * fix last regression * break auto fontconfig in configure script to fix qt5-tools * update baseline * enable verbose to debug ci * try to help it instead of breaking it * completly link icu * try to fix fontconfig configure * fix configure call. cannot be called with a list! * remove invalid line from patch * force icu and reduce the required icu libs according to the configure script * fix icu linkage * add more icu dependencies and names for windows * add more icu libs. Seems like all are needed * fix typo * print icu libs in debug * check releasenames * try again * change link order * add icu to wrapper * fix typo * patch icu configure for static windows builds * add other icu libraries to the icu patch * fix icu in x64-windows-static * update baseline. VTK builds in local WSL so it should work in CI * update VTK control to force rebuild * remove qt5-tools=pass from baseline * remove qcustomplot:x64-linux=fail from baseline Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-01-07 04:36:51 +08:00
#The fact that we are within this file means we are using the VCPKG toolchain. Has such we only need to search in VCPKG paths!
find_library(${_lib}_LIBRARY_DEBUG NAMES ${_lib}d ${_lib} NAMES_PER_DIR PATH_SUFFIXES lib plugins/platforms PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH)
find_library(${_lib}_LIBRARY_RELEASE NAMES ${_lib} NAMES_PER_DIR PATH_SUFFIXES lib plugins/platforms PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH)
if(${_lib}_LIBRARY_RELEASE)
list(APPEND interface_lib \$<\$<NOT:\$<CONFIG:DEBUG>>:${${_lib}_LIBRARY_RELEASE}>)
endif()
if(${_lib}_LIBRARY_DEBUG)
list(APPEND interface_lib \$<\$<CONFIG:DEBUG>:${${_lib}_LIBRARY_DEBUG}>)
endif()
set_property(TARGET ${_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib})
endforeach()
endfunction()
get_target_property(_target_type Qt5::Core TYPE)
if("${_target_type}" STREQUAL "STATIC_LIBRARY")
find_package(ZLIB)
find_package(JPEG)
find_package(PNG)
find_package(Freetype)
find_package(sqlite3 CONFIG)
find_package(PostgreSQL MODULE REQUIRED)
find_package(double-conversion CONFIG)
find_package(OpenSSL)
find_package(harfbuzz CONFIG)
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
ZLIB::ZLIB JPEG::JPEG PNG::PNG Freetype::Freetype sqlite3 harfbuzz::harfbuzz
[qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (#9260) * Fix static qt5 builds and ignore system qmake closes #9234 and #9239 * fix angle conflict and icu dependency * add egl-registry as a dependency * remove space * adding spaces resolved the problem * move files only if they exist * Update the Wrapper to use the Postgres target fixes some observed linkage issues * update baseline * add fontconfig on linux so CI is less flaky in a full rebuild * fix linkage dependent qt5-imageformats libs * Fix Wrapper for Linux and add other platform libs to Qt5::Core * fix plugin properties in cmake files * fix cmake files. * fix missing plugin qminimal deployment into tools dir * change wrapper slightly * UNIX also means APPLE so it needs to be excluded * fix the static windows build * mark the parts of fixcmake which require further work to work with single configuration builds * Update ci.baseline.txt make qt5-tools pass for CI testing * fix last regression * break auto fontconfig in configure script to fix qt5-tools * update baseline * enable verbose to debug ci * try to help it instead of breaking it * completly link icu * try to fix fontconfig configure * fix configure call. cannot be called with a list! * remove invalid line from patch * force icu and reduce the required icu libs according to the configure script * fix icu linkage * add more icu dependencies and names for windows * add more icu libs. Seems like all are needed * fix typo * print icu libs in debug * check releasenames * try again * change link order * add icu to wrapper * fix typo * patch icu configure for static windows builds * add other icu libraries to the icu patch * fix icu in x64-windows-static * update baseline. VTK builds in local WSL so it should work in CI * update VTK control to force rebuild * remove qt5-tools=pass from baseline * remove qcustomplot:x64-linux=fail from baseline Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-01-07 04:36:51 +08:00
double-conversion::double-conversion OpenSSL::SSL OpenSSL::Crypto PostgreSQL::PostgreSQL
)
add_qt_library(Qt5::Core
pcre2-16
[qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (#9260) * Fix static qt5 builds and ignore system qmake closes #9234 and #9239 * fix angle conflict and icu dependency * add egl-registry as a dependency * remove space * adding spaces resolved the problem * move files only if they exist * Update the Wrapper to use the Postgres target fixes some observed linkage issues * update baseline * add fontconfig on linux so CI is less flaky in a full rebuild * fix linkage dependent qt5-imageformats libs * Fix Wrapper for Linux and add other platform libs to Qt5::Core * fix plugin properties in cmake files * fix cmake files. * fix missing plugin qminimal deployment into tools dir * change wrapper slightly * UNIX also means APPLE so it needs to be excluded * fix the static windows build * mark the parts of fixcmake which require further work to work with single configuration builds * Update ci.baseline.txt make qt5-tools pass for CI testing * fix last regression * break auto fontconfig in configure script to fix qt5-tools * update baseline * enable verbose to debug ci * try to help it instead of breaking it * completly link icu * try to fix fontconfig configure * fix configure call. cannot be called with a list! * remove invalid line from patch * force icu and reduce the required icu libs according to the configure script * fix icu linkage * add more icu dependencies and names for windows * add more icu libs. Seems like all are needed * fix typo * print icu libs in debug * check releasenames * try again * change link order * add icu to wrapper * fix typo * patch icu configure for static windows builds * add other icu libraries to the icu patch * fix icu in x64-windows-static * update baseline. VTK builds in local WSL so it should work in CI * update VTK control to force rebuild * remove qt5-tools=pass from baseline * remove qcustomplot:x64-linux=fail from baseline Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-01-07 04:36:51 +08:00
icuin icui18n
icutu icuuc icuio
icudt icudata
Qt5ThemeSupport
Qt5EventDispatcherSupport
Qt5PlatformCompositorSupport
Qt5FontDatabaseSupport)
if(MSVC)
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
Netapi32.lib Ws2_32.lib Mincore.lib Winmm.lib Iphlpapi.lib Wtsapi32.lib Dwmapi.lib Imm32.lib)
add_qt_library(Qt5::Core Qt5WindowsUIAutomationSupport qwindows qdirect2d)
[qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (#9260) * Fix static qt5 builds and ignore system qmake closes #9234 and #9239 * fix angle conflict and icu dependency * add egl-registry as a dependency * remove space * adding spaces resolved the problem * move files only if they exist * Update the Wrapper to use the Postgres target fixes some observed linkage issues * update baseline * add fontconfig on linux so CI is less flaky in a full rebuild * fix linkage dependent qt5-imageformats libs * Fix Wrapper for Linux and add other platform libs to Qt5::Core * fix plugin properties in cmake files * fix cmake files. * fix missing plugin qminimal deployment into tools dir * change wrapper slightly * UNIX also means APPLE so it needs to be excluded * fix the static windows build * mark the parts of fixcmake which require further work to work with single configuration builds * Update ci.baseline.txt make qt5-tools pass for CI testing * fix last regression * break auto fontconfig in configure script to fix qt5-tools * update baseline * enable verbose to debug ci * try to help it instead of breaking it * completly link icu * try to fix fontconfig configure * fix configure call. cannot be called with a list! * remove invalid line from patch * force icu and reduce the required icu libs according to the configure script * fix icu linkage * add more icu dependencies and names for windows * add more icu libs. Seems like all are needed * fix typo * print icu libs in debug * check releasenames * try again * change link order * add icu to wrapper * fix typo * patch icu configure for static windows builds * add other icu libraries to the icu patch * fix icu in x64-windows-static * update baseline. VTK builds in local WSL so it should work in CI * update VTK control to force rebuild * remove qt5-tools=pass from baseline * remove qcustomplot:x64-linux=fail from baseline Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-01-07 04:36:51 +08:00
elseif(UNIX AND NOT APPLE)
add_qt_library(Qt5::Core
Qt5GraphicsSupport
Qt5ClipboardSupport
Qt5AccessibilitySupport)
elseif(APPLE)
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
"-weak_framework DiskArbitration" "-weak_framework IOKit" "-weak_framework Foundation" "-weak_framework CoreServices"
"-weak_framework AppKit" "-weak_framework Security" "-weak_framework ApplicationServices"
"-weak_framework CoreFoundation" "-weak_framework SystemConfiguration"
"-weak_framework Carbon"
"-weak_framework QuartzCore"
"-weak_framework CoreVideo"
"-weak_framework Metal"
"-weak_framework CoreText"
"-weak_framework ApplicationServices"
"-weak_framework CoreGraphics"
"-weak_framework OpenGL"
"-weak_framework AGL"
"-weak_framework ImageIO"
"z" "m"
cups)
add_qt_library(Qt5::Core
Qt5GraphicsSupport
Qt5ClipboardSupport
Qt5AccessibilitySupport
qcocoa)
endif()
endif()