2019-09-12 19:07:22 +02:00
set ( VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled )
include ( ${ CURRENT_INSTALLED_DIR } /share/qt5/qt_port_functions.cmake )
2019-09-20 23:06:43 +02:00
list ( APPEND CORE_OPTIONS
- s y s t e m - t i f f
- s y s t e m - w e b p
2020-01-06 21:36:51 +01:00
- j a s p e r
- n o - m n g # must be explicitly disabled to not automatically pick up mng
2019-09-20 23:06:43 +02:00
- v e r b o s e )
2020-04-24 06:19:45 +02:00
2022-12-31 10:30:53 +01:00
x_vcpkg_pkgconfig_get_modules ( PREFIX tiff MODULES libtiff-4 LIBS )
2020-04-24 06:19:45 +02:00
find_library ( JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
find_library ( ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
2019-09-20 23:06:43 +02:00
2020-01-06 21:36:51 +01:00
find_library ( JASPER_RELEASE NAMES jasper PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( JASPER_DEBUG NAMES jasperd jasper libjasperd libjasper PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
2022-06-30 22:01:24 +02:00
if ( NOT VCPKG_TARGET_IS_OSX AND NOT ( VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" ) )
set ( FREEGLUT_NEEDED ON )
endif ( )
if ( FREEGLUT_NEEDED )
2020-04-10 02:08:01 +02:00
find_library ( FREEGLUT_RELEASE NAMES freeglut glut PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( FREEGLUT_DEBUG NAMES freeglutd freeglut glutd glut PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
endif ( )
2020-01-06 21:36:51 +01:00
2019-09-20 23:06:43 +02:00
find_library ( WEBP_RELEASE NAMES webp PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
2022-04-13 20:26:56 +02:00
find_library ( WEBP_DEBUG NAMES webp PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
2019-09-20 23:06:43 +02:00
find_library ( WEBPDEMUX_RELEASE NAMES webpdemux PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
2022-04-13 20:26:56 +02:00
find_library ( WEBPDEMUX_DEBUG NAMES webpdemux PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
find_library ( WEBPMUX_RELEASE NAMES webpmux PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( WEBPMUX_DEBUG NAMES webpmux PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
find_library ( WEBPDECODER_RELEASE NAMES webpdecoder PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH )
find_library ( WEBPDECODER_DEBUG NAMES webpdecoder PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH )
2019-09-20 23:06:43 +02:00
# Depends on opengl in default build but might depend on giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows)
# which would require extra libraries to be linked e.g. giflib freeglut sdl1 other ones are already linked
2020-04-24 06:19:45 +02:00
if ( NOT VCPKG_TARGET_IS_WINDOWS )
string ( APPEND WEBP_RELEASE " -pthread" )
string ( APPEND WEBP_DEBUG " -pthread" )
endif ( )
2022-12-31 10:30:53 +01:00
set ( OPT_REL "TIFF_LIBS=${tiff_LIBS_RELEASE}"
2020-04-24 06:19:45 +02:00
" W E B P _ L I B S = $ { W E B P D E C O D E R _ R E L E A S E } $ { W E B P D E M U X _ R E L E A S E } $ { W E B P M U X _ R E L E A S E } $ { W E B P _ R E L E A S E } "
2022-06-30 22:01:24 +02:00
" J A S P E R _ L I B S = $ { J A S P E R _ R E L E A S E } $ { J P E G _ R E L E A S E } $ { Z L I B _ R E L E A S E } " ) # This will still fail if LIBWEBP is installed with all available features due to the missing additional dependencies
2022-12-31 10:30:53 +01:00
set ( OPT_DBG "TIFF_LIBS=${tiff_LIBS_DEBUG}"
2020-04-24 06:19:45 +02:00
" W E B P _ L I B S = $ { W E B P D E C O D E R _ D E B U G } $ { W E B P D E M U X _ D E B U G } $ { W E B P M U X _ D E B U G } $ { W E B P _ D E B U G } "
2022-06-30 22:01:24 +02:00
" J A S P E R _ L I B S = $ { J A S P E R _ D E B U G } $ { J P E G _ D E B U G } $ { Z L I B _ D E B U G } " )
if ( FREEGLUT_NEEDED )
set ( OPT_REL "${OPT_REL} ${FREEGLUT_RELEASE}" )
set ( OPT_DBG "${OPT_DBG} ${FREEGLUT_DEBUG}" )
endif ( )
2020-04-24 06:19:45 +02:00
list ( APPEND CORE_OPTIONS "WEBP_INCDIR=${CURRENT_INSTALLED_DIR}/include" ) # Requires libwebp[all]
2020-10-17 11:10:11 +02:00
qt_submodule_installation ( BUILD_OPTIONS ${ CORE_OPTIONS } BUILD_OPTIONS_RELEASE ${ OPT_REL } BUILD_OPTIONS_DEBUG ${ OPT_DBG } )