mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 09:29:07 +08:00
[nana] Fix fontconfig dependency (#15595)
* [nana] Fix fontconfig dependency * Update link library * Update find_package() as find_dependency() in config.cmake.in * Remove keyword REQUIRED from find_dependency()
This commit is contained in:
parent
0fe5f85e7b
commit
a904f297e5
@ -47,8 +47,8 @@ if(UNIX)
|
||||
target_include_directories(nana PUBLIC ${X11_INCLUDE_DIR})
|
||||
target_link_libraries(nana PUBLIC ${X11_LIBRARIES} ${X11_Xft_LIB})
|
||||
|
||||
find_library(FONTCONFIG_LIB NAMES fontconfig)
|
||||
target_link_libraries(nana PUBLIC ${FONTCONFIG_LIB})
|
||||
find_package(Fontconfig REQUIRED)
|
||||
target_link_libraries(nana PUBLIC Fontconfig::Fontconfig)
|
||||
endif()
|
||||
|
||||
if(NANA_ENABLE_PNG)
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: nana
|
||||
Version: 1.7.4
|
||||
Port-Version: 1
|
||||
Homepage: https://github.com/cnjinhao/nana
|
||||
Description: Cross-platform library for GUI programming in modern C++ style.
|
||||
Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows)
|
||||
|
@ -1,27 +1,28 @@
|
||||
@PACKAGE_INIT@
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if(UNIX)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(Freetype REQUIRED)
|
||||
find_package(X11 REQUIRED)
|
||||
find_library(FONTCONFIG_LIB NAMES fontconfig)
|
||||
find_dependency(Threads)
|
||||
find_dependency(Freetype)
|
||||
find_dependency(X11)
|
||||
find_dependency(Fontconfig)
|
||||
endif()
|
||||
|
||||
option(NANA_ENABLE_PNG "Enable PNG support" @NANA_ENABLE_PNG@)
|
||||
option(NANA_ENABLE_JPEG "Enable JPEG support" @NANA_ENABLE_JPEG@)
|
||||
|
||||
if(NANA_ENABLE_PNG)
|
||||
find_package(PNG REQUIRED)
|
||||
find_dependency(PNG)
|
||||
endif()
|
||||
|
||||
if(NANA_ENABLE_JPEG)
|
||||
find_package(JPEG REQUIRED)
|
||||
find_dependency(JPEG)
|
||||
endif()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-nana-targets.cmake")
|
||||
|
||||
if(UNIX)
|
||||
target_link_libraries(unofficial::nana::nana INTERFACE ${FONTCONFIG_LIB} ${X11_LIBRARIES} ${X11_Xft_LIB})
|
||||
target_link_libraries(unofficial::nana::nana INTERFACE Fontconfig::Fontconfig ${X11_LIBRARIES} ${X11_Xft_LIB})
|
||||
endif()
|
||||
|
||||
if(NANA_ENABLE_JPEG)
|
||||
|
Loading…
Reference in New Issue
Block a user