aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/nana/CMakeLists.txt4
-rw-r--r--ports/nana/CONTROL1
-rw-r--r--ports/nana/config.cmake.in15
3 files changed, 11 insertions, 9 deletions
diff --git a/ports/nana/CMakeLists.txt b/ports/nana/CMakeLists.txt
index 036d5bc8f..c66ce66b5 100644
--- a/ports/nana/CMakeLists.txt
+++ b/ports/nana/CMakeLists.txt
@@ -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)
diff --git a/ports/nana/CONTROL b/ports/nana/CONTROL
index 65e75a832..608fb8747 100644
--- a/ports/nana/CONTROL
+++ b/ports/nana/CONTROL
@@ -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)
diff --git a/ports/nana/config.cmake.in b/ports/nana/config.cmake.in
index 43b21dcc4..86d70cc69 100644
--- a/ports/nana/config.cmake.in
+++ b/ports/nana/config.cmake.in
@@ -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)