-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install 3rdparty headers for static builds
For static builds we need 3rdparty headers to be installed. Leaf modules like qtwebengine needs 3rdparty libs and header for zlib, freetype, harfbuzz, png, jpeg. Without those the Chromium bundled versions are used, however it might end up badly if qt has already bundled one. Introduce new header only modules with additional arguments for qt_internal_add_module: * EXTERNAL_HEADERS to pick exactly which headers are public * EXTERNAL_HEADERS_DIR to include whole directory preserving the files directory structure Fix qtsync so it keep directory structure for all non-qt modules when syncing headers and do not generate warnings for headers files. Task-number: QTBUG-87154 Task-number: QTBUG-88614 Change-Id: If1c27bf8608791cd4e0a21839d6316a445a96e9f Reviewed-by: Alexandru Croitor <[email protected]> Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
- Loading branch information
Michal Klocek
committed
Feb 19, 2022
1 parent
6944b4d
commit be2745e
Showing
14 changed files
with
221 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
include(QtFindWrapHelper NO_POLICY_SCOPE) | ||
|
||
qt_find_package_system_or_bundled(wrap_jpeg | ||
FRIENDLY_PACKAGE_NAME "Jpeg" | ||
WRAP_PACKAGE_TARGET "WrapJpeg::WrapJpeg" | ||
WRAP_PACKAGE_FOUND_VAR_NAME "WrapJpeg_FOUND" | ||
BUNDLED_PACKAGE_NAME "BundledLibjpeg" | ||
BUNDLED_PACKAGE_TARGET "BundledLibjpeg" | ||
SYSTEM_PACKAGE_NAME "WrapSystemJpeg" | ||
SYSTEM_PACKAGE_TARGET "WrapSystemJpeg::WrapSystemJpeg" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
if(TARGET WrapSystemJpeg::WrapSystemJpeg) | ||
set(WrapSystemJpeg_FOUND TRUE) | ||
return() | ||
endif() | ||
set(WrapSystemJpeg_REQUIRED_VARS __jpeg_found) | ||
|
||
find_package(JPEG ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET) | ||
|
||
set(__jpeg_target_name "JPEG::JPEG") | ||
if(JPEG_FOUND AND TARGET "${__jpeg_target_name}") | ||
set(__jpeg_found TRUE) | ||
endif() | ||
|
||
if(JPEG_LIBRARIES) | ||
list(PREPEND WrapSystemJpeg_REQUIRED_VARS JPEG_LIBRARIES) | ||
endif() | ||
if(JPEG_VERSION) | ||
set(WrapSystemJpeg_VERSION "${JPEG_VERSION}") | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(WrapSystemJpeg | ||
REQUIRED_VARS ${WrapSystemJpeg_REQUIRED_VARS} | ||
VERSION_VAR WrapSystemJpeg_VERSION) | ||
|
||
if(WrapSystemJpeg_FOUND) | ||
add_library(WrapSystemJpeg::WrapSystemJpeg INTERFACE IMPORTED) | ||
target_link_libraries(WrapSystemJpeg::WrapSystemJpeg | ||
INTERFACE "${__jpeg_target_name}") | ||
endif() | ||
unset(__jpeg_target_name) | ||
unset(__jpeg_found) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
qt_internal_add_3rdparty_library(BundledLibjpeg | ||
QMAKE_LIB_NAME libjpeg | ||
STATIC | ||
INSTALL | ||
SOURCES | ||
src/jaricom.c | ||
src/jcapimin.c | ||
src/jcapistd.c | ||
src/jcarith.c | ||
src/jccoefct.c | ||
src/jccolor.c | ||
src/jcdctmgr.c | ||
src/jchuff.c | ||
src/jcinit.c | ||
src/jcmainct.c | ||
src/jcmarker.c | ||
src/jcmaster.c | ||
src/jcomapi.c | ||
src/jcparam.c | ||
src/jcphuff.c | ||
src/jcprepct.c | ||
src/jcsample.c | ||
src/jctrans.c | ||
src/jdapimin.c | ||
src/jdapistd.c | ||
src/jdarith.c | ||
src/jdatadst.c | ||
src/jdatasrc.c | ||
src/jdcoefct.c | ||
src/jdcolor.c | ||
src/jddctmgr.c | ||
src/jdhuff.c | ||
src/jdinput.c | ||
src/jdmainct.c | ||
src/jdmarker.c | ||
src/jdmaster.c | ||
src/jdmerge.c | ||
src/jdphuff.c | ||
src/jdpostct.c | ||
src/jdsample.c | ||
src/jdtrans.c | ||
src/jerror.c | ||
src/jfdctflt.c | ||
src/jfdctfst.c | ||
src/jfdctint.c | ||
src/jidctflt.c | ||
src/jidctfst.c | ||
src/jidctint.c | ||
src/jidctred.c | ||
src/jmemmgr.c | ||
src/jmemnobs.c | ||
src/jquant1.c | ||
src/jquant2.c | ||
src/jsimd_none.c | ||
src/jutils.c | ||
INCLUDE_DIRECTORIES | ||
src | ||
PUBLIC_INCLUDE_DIRECTORIES | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> | ||
) | ||
|
||
qt_internal_add_3rdparty_header_module(JpegPrivate | ||
EXTERNAL_HEADERS | ||
src/jpeglib.h | ||
src/jerror.h | ||
) | ||
|
||
qt_disable_warnings(BundledLibjpeg) | ||
qt_set_symbol_visibility_hidden(BundledLibjpeg) | ||
|
||
qt_internal_extend_target(BundledLibjpeg CONDITION MSVC | ||
DEFINES | ||
_CRT_SECURE_NO_WARNINGS | ||
) | ||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" | ||
OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" | ||
OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") | ||
target_compile_options(BundledLibjpeg PRIVATE "-Wno-unused-parameter") | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.