mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 13:13:50 +08:00
d4422c3beb
* Major update to port poppler * Fixup usage requirements via main pc file * Add usage based on FindPkgConfig * Export unofficial cmake config * uwp is unsupported * [gdal] Add poppler feature * [gdal] Update poppler dependency * [gdal] Add patch for poppler C++17 API * Disable ENABLE_RELOCATABLE * Update to 22.02.0 from poppler gitlab * Update versions * [skip actions] CI with gdal tools * Revert "[skip actions] CI with gdal tools" * Modify feature name for private API * Update versions * Add license field to gdal manifest * Add port name to unofficial namespace * Rectify poppler version number * Update versions * poppler[fontconfig] doesn't build for MSVC * Update versions Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
30 lines
1.1 KiB
CMake
30 lines
1.1 KiB
CMake
if("${FONT_CONFIGURATION}" STREQUAL "fontconfig")
|
|
# Poppler uses different variable names than CMake.
|
|
find_package(Fontconfig REQUIRED)
|
|
set(FONTCONFIG_DEFINITIONS "")
|
|
set(FONTCONFIG_INCLUDE_DIR "${Fontconfig_INCLUDE_DIRS}")
|
|
set(FONTCONFIG_LIBRARIES "Fontconfig::Fontconfig")
|
|
endif()
|
|
|
|
# Poppler uses different variable names than CMake,
|
|
# plus ICONV_SECOND_ARGUMENT_IS_CONST
|
|
find_package(Iconv REQUIRED)
|
|
set(ICONV_INCLUDE_DIR "${Iconv_INCLUDE_DIR}")
|
|
set(ICONV_LIBRARIES "${Iconv_LIBRARIES}")
|
|
|
|
# Create helper file for iconv usage requirement
|
|
set(poppler_iconv [[
|
|
Name: poppler-vcpkg-iconv
|
|
Description: iconv linking requirements for poppler
|
|
Version: 0
|
|
Libs:]])
|
|
string(TOLOWER "${Iconv_LIBRARIES}" iconv_libraries)
|
|
if(iconv_libraries MATCHES "iconv")
|
|
string(APPEND poppler_iconv " -liconv")
|
|
endif()
|
|
if(iconv_libraries MATCHES "charset")
|
|
string(APPEND poppler_iconv " -lcharset")
|
|
endif()
|
|
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/poppler-vcpkg-iconv.pc" "${poppler_iconv}")
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/poppler-vcpkg-iconv.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|