mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fully remove bitmap font support (#11863)
Freetype is now a build requirement.
This commit is contained in:
parent
bf22569019
commit
76dbd0d2d0
50 changed files with 71 additions and 319 deletions
|
@ -122,16 +122,8 @@ if(BUILD_CLIENT)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
option(ENABLE_FREETYPE "Enable FreeType2 (TrueType fonts and basic unicode support)" TRUE)
|
||||
set(USE_FREETYPE FALSE)
|
||||
|
||||
if(BUILD_CLIENT AND ENABLE_FREETYPE)
|
||||
find_package(Freetype)
|
||||
if(FREETYPE_FOUND)
|
||||
message(STATUS "Freetype enabled.")
|
||||
set(USE_FREETYPE TRUE)
|
||||
endif()
|
||||
if(BUILD_CLIENT)
|
||||
find_package(Freetype REQUIRED)
|
||||
endif()
|
||||
|
||||
option(ENABLE_CURSES "Enable ncurses console" TRUE)
|
||||
|
@ -495,13 +487,11 @@ include_directories(
|
|||
${PROJECT_SOURCE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${ZSTD_INCLUDE_DIR}
|
||||
${SOUND_INCLUDE_DIRS}
|
||||
${SQLITE3_INCLUDE_DIR}
|
||||
${LUA_INCLUDE_DIR}
|
||||
${GMP_INCLUDE_DIR}
|
||||
${JSON_INCLUDE_DIR}
|
||||
${LUA_BIT_INCLUDE_DIR}
|
||||
${X11_INCLUDE_DIR}
|
||||
${PROJECT_SOURCE_DIR}/script
|
||||
)
|
||||
|
||||
|
@ -509,8 +499,12 @@ if(USE_GETTEXT)
|
|||
include_directories(${GETTEXT_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
if(USE_FREETYPE)
|
||||
include_directories(${FREETYPE_INCLUDE_DIRS})
|
||||
if(BUILD_CLIENT)
|
||||
include_directories(
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${SOUND_INCLUDE_DIRS}
|
||||
${X11_INCLUDE_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(USE_CURL)
|
||||
|
@ -539,6 +533,7 @@ if(BUILD_CLIENT)
|
|||
${GMP_LIBRARY}
|
||||
${JSON_LIBRARY}
|
||||
${LUA_BIT_LIBRARY}
|
||||
${FREETYPE_LIBRARY}
|
||||
${PLATFORM_LIBS}
|
||||
)
|
||||
if(NOT USE_LUAJIT)
|
||||
|
@ -573,17 +568,11 @@ if(BUILD_CLIENT)
|
|||
${CURL_LIBRARY}
|
||||
)
|
||||
endif()
|
||||
if(USE_FREETYPE)
|
||||
if(FREETYPE_PKGCONFIG_FOUND)
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
|
||||
)
|
||||
endif()
|
||||
target_link_libraries(
|
||||
${PROJECT_NAME}
|
||||
${FREETYPE_LIBRARY}
|
||||
)
|
||||
if(FREETYPE_PKGCONFIG_FOUND)
|
||||
set_target_properties(${PROJECT_NAME}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "${FREETYPE_CFLAGS_STR}"
|
||||
)
|
||||
endif()
|
||||
if (USE_CURSES)
|
||||
target_link_libraries(${PROJECT_NAME} ${CURSES_LIBRARIES})
|
||||
|
@ -896,14 +885,8 @@ if(BUILD_CLIENT)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
# Install necessary fonts depending on configuration
|
||||
if(USE_FREETYPE)
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}"
|
||||
FILES_MATCHING PATTERN "*.ttf" PATTERN "*.txt")
|
||||
else()
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}"
|
||||
FILES_MATCHING PATTERN "*.png" PATTERN "*.xml")
|
||||
endif()
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../fonts" DESTINATION "${SHAREDIR}"
|
||||
FILES_MATCHING PATTERN "*.ttf" PATTERN "*.txt")
|
||||
endif(BUILD_CLIENT)
|
||||
|
||||
if(BUILD_SERVER)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue