Files
MapLibreParticleLab/vendor/harfbuzz.cmake
2026-05-26 17:28:34 +02:00

33 lines
1.1 KiB
CMake

if(TARGET mbgl-harfbuzz)
return()
endif()
if (MLN_TEXT_SHAPING_HARFBUZZ)
add_library(mbgl-harfbuzz STATIC
${CMAKE_CURRENT_LIST_DIR}/harfbuzz/src/harfbuzz.cc
)
target_include_directories(mbgl-harfbuzz
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/harfbuzz/src
)
target_link_libraries(mbgl-harfbuzz PRIVATE mbgl-freetype)
target_include_directories(mbgl-harfbuzz PRIVATE ${CMAKE_CURRENT_LIST_DIR}/freetype/include)
target_compile_definitions(mbgl-harfbuzz PRIVATE -DHAVE_FREETYPE)
if(APPLE)
# Keep bundled HarfBuzz symbols private so they do not interpose symbols from
# app dependencies. See https://github.com/maplibre/maplibre-native/issues/3777.
target_compile_options(mbgl-harfbuzz PRIVATE -fvisibility=hidden)
endif()
set_target_properties(
mbgl-harfbuzz
PROPERTIES
INTERFACE_MAPLIBRE_NAME "harfbuzz"
INTERFACE_MAPLIBRE_URL "https://github.com/harfbuzz/harfbuzz"
INTERFACE_MAPLIBRE_AUTHOR ${CMAKE_CURRENT_LIST_DIR}/harfbuzz/AUTHORS
INTERFACE_MAPLIBRE_LICENSE ${CMAKE_CURRENT_LIST_DIR}/harfbuzz/COPYING
)
endif()