forked from conan-io/conan-center-index
-
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.
- Loading branch information
1 parent
abf0240
commit 98b6c07
Showing
2 changed files
with
85 additions
and
0 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
84 changes: 84 additions & 0 deletions
84
recipes/fltk/all/patches/1.4.0-0002-Use-find_package-for-Fontconfig.patch
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,84 @@ | ||
From f9684464d5dc45161b7ee3fee5ce41e3cd506d7b Mon Sep 17 00:00:00 2001 | ||
From: Jordan Williams <[email protected]> | ||
Date: Thu, 11 Apr 2024 08:06:51 -0500 | ||
Subject: [PATCH] Use find_package for Fontconfig | ||
|
||
--- | ||
CMake/options.cmake | 2 +- | ||
CMake/resources.cmake | 4 ++-- | ||
CMake/variables.cmake | 6 +++--- | ||
src/CMakeLists.txt | 6 +++--- | ||
4 files changed, 9 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/CMake/options.cmake b/CMake/options.cmake | ||
index c4ba98914..e7414487f 100644 | ||
--- a/CMake/options.cmake | ||
+++ b/CMake/options.cmake | ||
@@ -951,7 +951,7 @@ if(FLTK_USE_XFT) | ||
list(APPEND FLTK_LDLIBS -lXft) | ||
set(FLTK_XFT_FOUND TRUE) | ||
if(APPLE AND FLTK_BACKEND_X11) | ||
- find_library(LIB_fontconfig fontconfig "/opt/X11/lib") | ||
+ find_package(Fontconfig) | ||
endif() | ||
else() | ||
set(FLTK_XFT_FOUND FALSE) | ||
diff --git a/CMake/resources.cmake b/CMake/resources.cmake | ||
index e5d6f8c9f..657514db3 100644 | ||
--- a/CMake/resources.cmake | ||
+++ b/CMake/resources.cmake | ||
@@ -147,7 +147,7 @@ mark_as_advanced(FREETYPE_PATH) | ||
# libraries | ||
find_library(LIB_dl dl) | ||
if((NOT APPLE) OR FLTK_BACKEND_X11) | ||
- find_library(LIB_fontconfig fontconfig) | ||
+ find_package(Fontconfig) | ||
endif((NOT APPLE) OR FLTK_BACKEND_X11) | ||
find_library(LIB_freetype freetype) | ||
find_library(LIB_GL GL) | ||
@@ -158,7 +158,7 @@ find_library(LIB_png png) | ||
find_library(LIB_zlib z) | ||
find_library(LIB_m m) | ||
|
||
-mark_as_advanced(LIB_dl LIB_fontconfig LIB_freetype) | ||
+mark_as_advanced(LIB_dl LIB_freetype) | ||
mark_as_advanced(LIB_GL LIB_MesaGL LIB_GLEW) | ||
mark_as_advanced(LIB_jpeg LIB_png LIB_zlib) | ||
mark_as_advanced(LIB_m) | ||
diff --git a/CMake/variables.cmake b/CMake/variables.cmake | ||
index cbf6ffdf3..dbcb65a45 100644 | ||
--- a/CMake/variables.cmake | ||
+++ b/CMake/variables.cmake | ||
@@ -53,9 +53,9 @@ else() | ||
list(APPEND FLTK_LDLIBS -lm) | ||
endif(WIN32) | ||
|
||
-if(LIB_fontconfig) | ||
- list(APPEND FLTK_LDLIBS -lfontconfig) | ||
-endif(LIB_fontconfig) | ||
+if(Fontconfig_FOUND) | ||
+ list(APPEND FLTK_LDLIBS Fontconfig::Fontconfig) | ||
+endif() | ||
|
||
# add "-ldl" or whatever is necessary according to CMake (CMAKE_DL_LIBS) | ||
if(HAVE_DLSYM) | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index e283f0ce4..facfb9f72 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -685,9 +685,9 @@ endif(USE_PANGO) | ||
|
||
if(USE_XFT) | ||
list(APPEND OPTIONAL_LIBS ${X11_Xft_LIB}) | ||
- if(LIB_fontconfig) | ||
- list(APPEND OPTIONAL_LIBS ${LIB_fontconfig}) | ||
- endif(LIB_fontconfig) | ||
+ if(Fontconfig_FOUND) | ||
+ list(APPEND OPTIONAL_LIBS Fontconfig::Fontconfig) | ||
+ endif() | ||
endif(USE_XFT) | ||
|
||
if(UNIX AND FLTK_BACKEND_WAYLAND) | ||
-- | ||
2.44.0 | ||
|