add a lib for rendering text in sdl2 and rules to make in makefile
This commit is contained in:
13
SDL2_ttf/build/SDL2_ttf-.pc
Normal file
13
SDL2_ttf/build/SDL2_ttf-.pc
Normal file
@@ -0,0 +1,13 @@
|
||||
prefix=/usr/local
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SDL2_ttf
|
||||
Description: ttf library for Simple DirectMedia Layer with FreeType 2 support
|
||||
Version: 2.24.0
|
||||
Requires: sdl2 >= 2.0.10
|
||||
Libs: -L${libdir} -lSDL2_ttf
|
||||
Cflags: -I${includedir}/SDL2
|
||||
Requires.private: freetype2
|
||||
Libs.private:
|
||||
13
SDL2_ttf/build/SDL2_ttf.pc.intermediate
Normal file
13
SDL2_ttf/build/SDL2_ttf.pc.intermediate
Normal file
@@ -0,0 +1,13 @@
|
||||
prefix=/usr/local
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: SDL2_ttf
|
||||
Description: ttf library for Simple DirectMedia Layer with FreeType 2 support
|
||||
Version: 2.24.0
|
||||
Requires: sdl2 >= 2.0.10
|
||||
Libs: -L${libdir} -lSDL2_ttf
|
||||
Cflags: -I${includedir}/SDL2
|
||||
Requires.private: freetype2
|
||||
Libs.private:
|
||||
53
SDL2_ttf/build/SDL2_ttfConfig.cmake
Normal file
53
SDL2_ttf/build/SDL2_ttfConfig.cmake
Normal file
@@ -0,0 +1,53 @@
|
||||
# sdl2_ttf cmake project-config input for CMakeLists.txt script
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(SDL2_ttf PROPERTIES
|
||||
URL "https://www.libsdl.org/projects/SDL_ttf/"
|
||||
DESCRIPTION "Support for TrueType (.ttf) font files with Simple Directmedia Layer"
|
||||
)
|
||||
|
||||
set(SDL2_ttf_FOUND ON)
|
||||
|
||||
set(SDL2TTF_VENDORED OFF)
|
||||
|
||||
set(SDL2TTF_HARFBUZZ OFF)
|
||||
set(SDL2TTF_FREETYPE ON)
|
||||
|
||||
set(SDL2TTF_SDL2_REQUIRED_VERSION 2.0.10)
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2_ttf-shared-targets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2_ttf-shared-targets.cmake")
|
||||
endif()
|
||||
|
||||
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2_ttf-static-targets.cmake")
|
||||
if(SDL2TTF_VENDORED)
|
||||
include(CheckLanguage)
|
||||
check_language(CXX)
|
||||
if(NOT CMAKE_CXX_COMPILER AND NOT _sdl2ttf_nowarning)
|
||||
message(WARNING "CXX language not enabled. Linking to SDL2_ttf::SDL2_ttf-static might fail.")
|
||||
endif()
|
||||
endif()
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/SDL2_ttf-static-targets.cmake")
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT SDL2TTF_VENDORED)
|
||||
set(_sdl_cmake_module_path "${CMAKE_MODULE_PATH}")
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
if(TARGET SDL2_ttf::SDL2_ttf-static)
|
||||
if(SDL2TTF_FREETYPE)
|
||||
find_dependency(Freetype)
|
||||
endif()
|
||||
|
||||
if(SDL2TTF_HARFBUZZ)
|
||||
list(APPEND harfbuzz_ROOT "${CMAKE_CURRENT_LIST_DIR}")
|
||||
find_dependency(harfbuzz)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_MODULE_PATH "${_sdl_cmake_module_path}")
|
||||
unset(_sdl_cmake_module_path)
|
||||
endif()
|
||||
43
SDL2_ttf/build/SDL2_ttfConfigVersion.cmake
Normal file
43
SDL2_ttf/build/SDL2_ttfConfigVersion.cmake
Normal file
@@ -0,0 +1,43 @@
|
||||
# This is a basic version file for the Config-mode of find_package().
|
||||
# It is used by write_basic_package_version_file() as input file for configure_file()
|
||||
# to create a version-file which can be installed along a config.cmake file.
|
||||
#
|
||||
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
||||
# the requested version string are exactly the same and it sets
|
||||
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
set(PACKAGE_VERSION "2.24.0")
|
||||
|
||||
if (PACKAGE_FIND_VERSION_RANGE)
|
||||
# Package version must be in the requested version range
|
||||
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
||||
math(EXPR installedBits "8 * 8")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
BIN
SDL2_ttf/build/glfont
Executable file
BIN
SDL2_ttf/build/glfont
Executable file
Binary file not shown.
BIN
SDL2_ttf/build/showfont
Executable file
BIN
SDL2_ttf/build/showfont
Executable file
Binary file not shown.
Reference in New Issue
Block a user