twn_text: embed default font
This commit is contained in:
@@ -354,5 +354,21 @@ link_deps(twn_third_parties)
|
||||
give_options(${TWN_TARGET})
|
||||
include_deps(${TWN_TARGET})
|
||||
link_deps(${TWN_TARGET})
|
||||
target_link_libraries(${TWN_TARGET} PUBLIC twn_third_parties)
|
||||
target_include_directories(${TWN_TARGET} PRIVATE ${TWN_ROOT_DIR}/src)
|
||||
target_link_libraries(${TWN_TARGET} PUBLIC
|
||||
twn_third_parties
|
||||
${CMAKE_CURRENT_BINARY_DIR}/font.o)
|
||||
|
||||
# embed resources
|
||||
# TODO: think of a portable way to compress/decompress them
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/font.o
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_LINKER} --relocatable --format binary
|
||||
--output ${CMAKE_CURRENT_BINARY_DIR}/font.o
|
||||
share/assets/Dernyns256.ttf
|
||||
DEPENDS share/assets/Dernyns256.ttf
|
||||
)
|
||||
|
||||
add_custom_target(asset-compilation ALL DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/font.o)
|
||||
|
||||
Reference in New Issue
Block a user