Files
Crosspoint/test/cpfont_adapter/CMakeLists.txt
T
Justin Mitchell 0848649ce2 Add FreeInkBook EPUB engine migration guide
Document migration plan from CrossPoint's lib/Epub to FreeInkBook, a memory-efficient clean-room EPUB engine. Covers advantages (O(paragraph+page) memory via SAX parsing, arena allocation, host-testable, full UAX#14 typography, runtime TTF/OTF support), 9-step migration strategy, ESP32-C3 constraints, and integration approach preserving existing UI layer while replacing parsing/layout stack.
2026-07-08 00:22:21 -04:00

35 lines
1.2 KiB
CMake

# CpFontAdapter binds .cpfont metrics to FreeInkBook's RenderFont interface;
# the suite needs the engine's freestanding headers. Prefer the submodule;
# fall back to the sibling working checkout while the submodule pin predates
# libs/book (drop the fallback once the pin advances).
set(FREEINK_BOOK_INCLUDE "${REPO_ROOT}/freeink-sdk/libs/book/FreeInkBook/include")
if(NOT EXISTS "${FREEINK_BOOK_INCLUDE}")
set(FREEINK_BOOK_INCLUDE "$ENV{HOME}/GitHub/freeink-sdk/libs/book/FreeInkBook/include")
endif()
if(NOT EXISTS "${FREEINK_BOOK_INCLUDE}")
message(WARNING "FreeInkBook headers not found - skipping CpFontAdapterTest")
else()
add_executable(CpFontAdapterTest
CpFontAdapterTest.cpp
${REPO_ROOT}/src/activities/reader/CpFontAdapter.cpp
${REPO_ROOT}/lib/EpdFont/EpdFont.cpp
${REPO_ROOT}/lib/EpdFont/EpdFontFamily.cpp
${REPO_ROOT}/lib/Utf8/Utf8.cpp
)
target_include_directories(CpFontAdapterTest PRIVATE
${REPO_ROOT}/src/activities/reader
${REPO_ROOT}/lib/EpdFont
${REPO_ROOT}/lib/Utf8
${FREEINK_BOOK_INCLUDE}
)
target_link_libraries(CpFontAdapterTest PRIVATE
crosspoint_test_common
GTest::gtest_main
)
gtest_discover_tests(CpFontAdapterTest)
endif()