diff --git a/CMakeLists.txt b/CMakeLists.txt index bfe0e3062..6199e4421 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,8 +253,10 @@ set (project_sources ${HB_FALLBACK_sources} ${HB_OT_sources} - ${HB_OT_RAGEL_GENERATED_sources} + ${HB_OT_RAGEL_GENERATED_sources} +) +set (subset_project_sources ${HB_SUBSET_sources} ) @@ -268,6 +270,10 @@ set (project_headers ${HB_SUBSET_headers} ) +set (subset_project_headers + ${HB_SUBSET_headers} +) + ## Find and include needed header folders and libraries if (HB_HAVE_FREETYPE) @@ -530,6 +536,11 @@ endif () add_library(harfbuzz ${project_sources} ${project_extra_sources} ${project_headers}) target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS}) +## Define harfbuzz-subset library +add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers}) +add_dependencies(harfbuzz-subset harfbuzz) +target_link_libraries(harfbuzz-subset harfbuzz ${THIRD_PARTY_LIBS}) + if (UNIX OR MINGW) # Make symbols link locally link_libraries(-Bsymbolic-functions) @@ -540,6 +551,7 @@ if (UNIX OR MINGW) set (CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "m") # libm set (CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "") set_target_properties(harfbuzz PROPERTIES LINKER_LANGUAGE C) + set_target_properties(harfbuzz-subset PROPERTIES LINKER_LANGUAGE C) endif () # No threadsafe statics as we do it ourselves @@ -548,7 +560,6 @@ if (UNIX OR MINGW) endif () endif () - ## Define harfbuzz-gobject library if (HB_HAVE_GOBJECT) add_library(harfbuzz-gobject @@ -720,7 +731,7 @@ if (HB_BUILD_UTILS) target_link_libraries(hb-shape harfbuzz) add_executable(hb-subset ${HB_SUBSET_CLI_sources}) - target_link_libraries(hb-subset harfbuzz) + target_link_libraries(hb-subset harfbuzz harfbuzz-subset) add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources}) target_link_libraries(hb-ot-shape-closure harfbuzz) diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt index c3914e481..f1a2300f8 100644 --- a/test/api/CMakeLists.txt +++ b/test/api/CMakeLists.txt @@ -20,7 +20,7 @@ if (HB_HAVE_GLIB) else () message (FATAL_ERROR "No source file found for test ${test_name}") endif () - target_link_libraries (${test_name} harfbuzz) + target_link_libraries (${test_name} harfbuzz harfbuzz-subset) add_test (${test_name} ${test_name}) endforeach () set_tests_properties (${TEST_PROGS} PROPERTIES ENVIRONMENT