[subset] Export header & archive when HB_BUILD_SUBSET

Ease the adopt of hb-subset feature for 3rd party developers
This commit is contained in:
faywong 2021-10-11 21:01:21 +08:00 committed by Behdad Esfahbod
parent 36ed56b6e8
commit f8538d3117
1 changed files with 6 additions and 0 deletions

View File

@ -437,6 +437,7 @@ endif ()
## Define harfbuzz-subset library
if (HB_BUILD_SUBSET)
add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers})
list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-subset.h)
add_dependencies(harfbuzz-subset harfbuzz)
target_link_libraries(harfbuzz-subset harfbuzz ${THIRD_PARTY_LIBS})
@ -702,6 +703,11 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
FRAMEWORK DESTINATION Library/Frameworks
)
endif ()
if (HB_BUILD_SUBSET)
install(TARGETS harfbuzz-subset
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif ()
if (HB_BUILD_UTILS)
if (WIN32 AND BUILD_SHARED_LIBS)
install(TARGETS harfbuzz-subset