Add CMake configuration for all of the new subsetting code.

This commit is contained in:
Garret Rieger 2018-02-02 17:50:45 -08:00 committed by Rod Sheeter
parent 5bc0cda179
commit f83a43b561
6 changed files with 33 additions and 4 deletions

View File

@ -171,6 +171,12 @@ add_prefix_to_list(HB_OT_sources "${PROJECT_SOURCE_DIR}/src/")
extract_make_variable(HB_OT_headers ${SRCSOURCES})
add_prefix_to_list(HB_OT_headers "${PROJECT_SOURCE_DIR}/src/")
extract_make_variable(HB_SUBSET_sources ${SRCSOURCES})
add_prefix_to_list(HB_SUBSET_sources "${PROJECT_SOURCE_DIR}/src/")
extract_make_variable(HB_SUBSET_headers ${SRCSOURCES})
add_prefix_to_list(HB_SUBSET_headers "${PROJECT_SOURCE_DIR}/src/")
extract_make_variable(HB_BASE_RAGEL_GENERATED_sources ${SRCSOURCES})
extract_make_variable(HB_OT_RAGEL_GENERATED_sources ${SRCSOURCES})
if (IN_HB_DIST)
@ -185,6 +191,8 @@ extract_make_variable(HB_VIEW_sources ${UTILSOURCES})
add_prefix_to_list(HB_VIEW_sources "${PROJECT_SOURCE_DIR}/util/")
extract_make_variable(HB_SHAPE_sources ${UTILSOURCES})
add_prefix_to_list(HB_SHAPE_sources "${PROJECT_SOURCE_DIR}/util/")
extract_make_variable(HB_SUBSET_CLI_sources ${UTILSOURCES})
add_prefix_to_list(HB_SUBSET_CLI_sources "${PROJECT_SOURCE_DIR}/util/")
extract_make_variable(HB_OT_SHAPE_CLOSURE_sources ${UTILSOURCES})
add_prefix_to_list(HB_OT_SHAPE_CLOSURE_sources "${PROJECT_SOURCE_DIR}/util/")
@ -246,6 +254,8 @@ set (project_sources
${HB_FALLBACK_sources}
${HB_OT_sources}
${HB_OT_RAGEL_GENERATED_sources}
${HB_SUBSET_sources}
)
set (project_extra_sources)
@ -255,6 +265,7 @@ set (project_headers
${HB_BASE_headers}
${HB_OT_headers}
${HB_SUBSET_headers}
)
@ -708,6 +719,9 @@ if (HB_BUILD_UTILS)
add_executable(hb-shape ${HB_SHAPE_sources})
target_link_libraries(hb-shape harfbuzz)
add_executable(hb-subset ${HB_SUBSET_CLI_sources})
target_link_libraries(hb-subset harfbuzz)
add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources})
target_link_libraries(hb-ot-shape-closure harfbuzz)

View File

@ -182,8 +182,13 @@ HB_ICU_sources = hb-icu.cc
HB_ICU_headers = hb-icu.h
# Sources for libharfbuzz-subset
HB_SUBSET_sources = hb-subset.cc
HB_SUBSET_headers = hb-subset.h
HB_SUBSET_sources = \
hb-subset.cc \
$(NULL)
HB_SUBSET_headers = \
hb-subset.h \
$(NULL)
HB_GOBJECT_sources = hb-gobject-structs.cc
HB_GOBJECT_STRUCTS_headers = hb-gobject-structs.h

View File

@ -1,3 +1,4 @@
add_subdirectory(api)
add_subdirectory(shaping)
add_subdirectory(subset)
add_subdirectory(fuzzing)

View File

@ -0,0 +1,9 @@
if (HB_BUILD_UTILS)
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/data/Makefile.sources" SOURCES)
extract_make_variable (TESTS ${SOURCES})
foreach (test IN ITEMS ${TESTS})
add_test (NAME ${test}
COMMAND python run-tests.py $<TARGET_FILE:hb-subset> "data/${test}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endforeach ()
endif ()

View File

@ -46,7 +46,7 @@ endif # HAVE_FREETYPE
hb_shape_SOURCES = $(HB_SHAPE_sources)
bin_PROGRAMS += hb-shape
hb_subset_SOURCES = $(HB_SUBSET_sources)
hb_subset_SOURCES = $(HB_SUBSET_CLI_sources)
bin_PROGRAMS += hb-subset
if HAVE_OT

View File

@ -29,7 +29,7 @@ HB_OT_SHAPE_CLOSURE_sources = \
main-font-text.hh \
$(NULL)
HB_SUBSET_sources = \
HB_SUBSET_CLI_sources = \
hb-subset.cc \
options.cc \
options.hh \