2019-04-15 20:00:14 +08:00
|
|
|
_find_package(${ARGS})
|
|
|
|
|
|
|
|
function(add_qt_library _target)
|
|
|
|
foreach(_lib IN LISTS ARGN)
|
2019-05-09 06:15:26 +08:00
|
|
|
find_library(${_lib}_LIBRARY_DEBUG NAMES ${_lib}d PATH_SUFFIXES debug/plugins/platforms)
|
2019-04-15 20:00:14 +08:00
|
|
|
find_library(${_lib}_LIBRARY_RELEASE NAMES ${_lib} PATH_SUFFIXES plugins/platforms)
|
2019-05-09 06:15:26 +08:00
|
|
|
set_property(TARGET ${_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
2019-04-15 20:00:14 +08:00
|
|
|
\$<\$<NOT:\$<CONFIG:DEBUG>>:${${_lib}_LIBRARY_RELEASE}>\$<\$<CONFIG:DEBUG>:${${_lib}_LIBRARY_DEBUG}>)
|
|
|
|
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)
|
|
|
|
|
2019-05-09 06:15:26 +08:00
|
|
|
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
2019-04-15 20:00:14 +08:00
|
|
|
ZLIB::ZLIB JPEG::JPEG PNG::PNG Freetype::Freetype sqlite3 harfbuzz::harfbuzz
|
2019-05-09 06:15:26 +08:00
|
|
|
${PostgreSQL_LIBRARY} double-conversion::double-conversion OpenSSL::SSL OpenSSL::Crypto
|
2019-04-15 20:00:14 +08:00
|
|
|
)
|
|
|
|
|
2019-05-09 06:15:26 +08:00
|
|
|
add_qt_library(Qt5::Core
|
|
|
|
pcre2-16
|
2019-04-15 20:00:14 +08:00
|
|
|
Qt5ThemeSupport
|
|
|
|
Qt5EventDispatcherSupport
|
2019-05-09 06:15:26 +08:00
|
|
|
Qt5PlatformCompositorSupport
|
2019-04-15 20:00:14 +08:00
|
|
|
Qt5FontDatabaseSupport)
|
|
|
|
|
|
|
|
if(MSVC)
|
2019-05-09 06:15:26 +08:00
|
|
|
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_LINK_LIBRARIES
|
2019-04-15 20:00:14 +08:00
|
|
|
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)
|
|
|
|
|
|
|
|
elseif(APPLE)
|
2019-05-09 06:15:26 +08:00
|
|
|
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"
|
2019-04-15 20:00:14 +08:00
|
|
|
"-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"
|
2019-05-09 06:15:26 +08:00
|
|
|
"-weak_framework ImageIO"
|
2019-04-15 20:00:14 +08:00
|
|
|
"z" "m"
|
|
|
|
cups)
|
2019-05-09 06:15:26 +08:00
|
|
|
add_qt_library(Qt5::Core
|
2019-04-15 20:00:14 +08:00
|
|
|
Qt5GraphicsSupport
|
|
|
|
Qt5ClipboardSupport
|
|
|
|
Qt5AccessibilitySupport
|
|
|
|
qcocoa)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
endif()
|