summaryrefslogtreecommitdiff
path: root/indra/cmake/FreeType.cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-11 20:35:40 +0800
committerErik Kundiman <erik@megapahit.org>2023-07-19 10:50:36 +0800
commitb2dbc73384ffcb65d3a50a4a38a367466ddb45ea (patch)
tree2f28d0bd139cc3cde7e1ceee977c7445019b6bab /indra/cmake/FreeType.cmake
parent16d30ec8b5a8bca3fac191d7bfe617a08913f803 (diff)
Obtain FreeType flags when using system libs
The module name to check with pkgconf is different, hence the special treatment.
Diffstat (limited to 'indra/cmake/FreeType.cmake')
-rw-r--r--indra/cmake/FreeType.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake
index 77140af641..fbf188d100 100644
--- a/indra/cmake/FreeType.cmake
+++ b/indra/cmake/FreeType.cmake
@@ -4,6 +4,15 @@ include(Prebuilt)
include_guard()
add_library( ll::freetype INTERFACE IMPORTED )
+if (NOT (USE_AUTOBUILD_3P OR USE_CONAN))
+ include(FindPkgConfig)
+ pkg_check_modules(Freetype REQUIRED freetype2)
+ target_include_directories( ll::freetype SYSTEM INTERFACE ${Freetype_INCLUDE_DIRS} )
+ target_link_directories( ll::freetype INTERFACE ${Freetype_LIBRARY_DIRS} )
+ target_link_libraries( ll::freetype INTERFACE ${Freetype_LIBRARIES} )
+ return ()
+endif ()
+
use_system_binary(freetype)
use_prebuilt_binary(freetype)
target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/)