diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2018-01-20 16:23:23 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2018-01-20 15:53:35 +0000 |
commit | 72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da (patch) | |
tree | 12aa46467fee26d430f543788c66a20a20f98396 /Source/cmake | |
parent | 79143ccfc158ec4fffc49eee600d600edb342b16 (diff) | |
download | qtwebkit-72cfbd7664f21fcc0e62b869a6b01bf73eb5e7da.tar.gz |
Import WebKit commit 025cd3fc8d29620535309aa3e2ab7075aad36044
Change-Id: I39d60de0f241abc52c0c4eb174eba7882d576f24
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/cmake')
-rw-r--r-- | Source/cmake/FindICU.cmake | 4 | ||||
-rw-r--r-- | Source/cmake/OptionsQt.cmake | 35 |
2 files changed, 36 insertions, 3 deletions
diff --git a/Source/cmake/FindICU.cmake b/Source/cmake/FindICU.cmake index c0de36338..4e93286f3 100644 --- a/Source/cmake/FindICU.cmake +++ b/Source/cmake/FindICU.cmake @@ -24,7 +24,7 @@ mark_as_advanced(ICU_INCLUDE_DIR) # Look for the library. find_library( ICU_LIBRARY - NAMES sicuuc icuuc cygicuuc cygicuuc32 + NAMES icuuc cygicuuc cygicuuc32 HINTS ${PC_ICU_LIBRARY_DIRS} ${PC_ICU_LIBDIR} DOC "Libraries to link against for the common parts of ICU") @@ -49,7 +49,7 @@ if (ICU_INCLUDE_DIR AND ICU_LIBRARY) pkg_check_modules(PC_ICU_I18N icu-i18n) find_library( ICU_I18N_LIBRARY - NAMES sicui18n sicuin icui18n icuin cygicuin cygicuin32 + NAMES icui18n icuin cygicuin cygicuin32 HINTS ${PC_ICU_I18N_LIBRARY_DIRS} ${PC_ICU_I18N_LIBDIR} DOC "Libraries to link against for ICU internationalization") diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake index 559b2ab8b..003fdca41 100644 --- a/Source/cmake/OptionsQt.cmake +++ b/Source/cmake/OptionsQt.cmake @@ -1,3 +1,4 @@ +include(CheckCXXSourceCompiles) include(FeatureSummary) include(ECMEnableSanitizers) include(ECMPackageConfigHelpers) @@ -53,6 +54,30 @@ macro(CONVERT_PRL_LIBS_TO_CMAKE _qt_component) endif () endmacro() +macro(CHECK_QT5_PRIVATE_INCLUDE_DIRS _qt_component _header) + set(INCLUDE_TEST_SOURCE + " + #include <${_header}> + int main() { return 0; } + " + ) + set(CMAKE_REQUIRED_INCLUDES ${Qt5${_qt_component}_PRIVATE_INCLUDE_DIRS}) + set(CMAKE_REQUIRED_LIBRARIES Qt5::${_qt_component}) + + # Avoid check_include_file_cxx() because it performs linking but doesn't support CMAKE_REQUIRED_LIBRARIES (doh!) + check_cxx_source_compiles("${INCLUDE_TEST_SOURCE}" Qt5${_qt_component}_PRIVATE_HEADER_FOUND) + + unset(INCLUDE_TEST_SOURCE) + unset(CMAKE_REQUIRED_INCLUDES) + unset(CMAKE_REQUIRED_LIBRARIES) + + if (NOT Qt5${_qt_component}_PRIVATE_HEADER_FOUND) + message(FATAL_ERROR "Header ${_header} is not found. Please make sure that: + 1. Private headers of Qt5${_qt_component} are installed + 2. Qt5${_qt_component}_PRIVATE_INCLUDE_DIRS is correctly defined in Qt5${_qt_component}Config.cmake") + endif () +endmacro() + macro(QT_ADD_EXTRA_WEBKIT_TARGET_EXPORT target) if (QT_STATIC_BUILD OR SHARED_CORE) install(TARGETS ${target} EXPORT WebKitTargets @@ -131,11 +156,13 @@ endif () WEBKIT_OPTION_BEGIN() if (APPLE) + set(MACOS_COMPATIBILITY_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}" CACHE STRING "Compatibility version that macOS dylibs should have") + option(MACOS_FORCE_SYSTEM_XML_LIBRARIES "Use system installation of libxml2 and libxslt on macOS" ON) option(MACOS_USE_SYSTEM_ICU "Use system installation of ICU on macOS" ON) option(USE_UNIX_DOMAIN_SOCKETS "Use Unix domain sockets instead of native IPC code on macOS" OFF) option(USE_APPSTORE_COMPLIANT_CODE "Avoid using private macOS APIs which are not allowed on App Store (experimental)" OFF) - set(MACOS_BUILD_FRAMEWORKS ON) # TODO: Make it an option + option(MACOS_BUILD_FRAMEWORKS "Build QtWebKit as framework bundles" ON) if (USE_APPSTORE_COMPLIANT_CODE) set(MACOS_USE_SYSTEM_ICU OFF) @@ -581,6 +608,12 @@ if (ENABLE_QT_WEBCHANNEL) endif () find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS ${QT_REQUIRED_COMPONENTS}) + +CHECK_QT5_PRIVATE_INCLUDE_DIRS(Gui private/qhexstring_p.h) +if (ENABLE_WEBKIT2) + CHECK_QT5_PRIVATE_INCLUDE_DIRS(Quick private/qsgrendernode_p.h) +endif () + if (QT_STATIC_BUILD) foreach (qt_module ${QT_REQUIRED_COMPONENTS}) CONVERT_PRL_LIBS_TO_CMAKE(${qt_module}) |