mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 13:48:59 +08:00
commit
bf47b51f7b
24
ports/sdl2-ttf/CMakeLists.txt
Normal file
24
ports/sdl2-ttf/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(SDL2_TTF C)
|
||||
|
||||
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
|
||||
find_library(SDL_LIBRARY SDL2)
|
||||
find_package(FreeType REQUIRED)
|
||||
|
||||
add_library(SDL2_ttf SDL_ttf.c)
|
||||
|
||||
target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIR_ft2build})
|
||||
target_link_libraries(SDL2_ttf ${SDL_LIBRARY} ${FREETYPE_LIBRARY})
|
||||
|
||||
install(TARGETS SDL2_ttf
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib)
|
||||
|
||||
if(NOT DEFINED SDL_TTF_SKIP_HEADERS)
|
||||
install(FILES SDL_ttf.h DESTINATION include/SDL2)
|
||||
endif()
|
||||
|
||||
message(STATUS "Link-time dependencies:")
|
||||
message(STATUS " " ${SDL_LIBRARY})
|
||||
message(STATUS " " ${FREETYPE_LIBRARY})
|
4
ports/sdl2-ttf/CONTROL
Normal file
4
ports/sdl2-ttf/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: sdl2-ttf
|
||||
Version: 2.0.14
|
||||
Description: A library for rendering TrueType fonts with SDL
|
||||
Build-Depends: sdl2, freetype
|
23
ports/sdl2-ttf/portfile.cmake
Normal file
23
ports/sdl2-ttf/portfile.cmake
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_ttf-2.0.14)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz"
|
||||
FILENAME "SDL2_ttf-2.0.14.tar.gz"
|
||||
SHA512 4db817573fd216e26180f4c401cc869ce407589a461032fd7167dc612d35e038cca1ab67be7909b6b49c741581a68125ab46362ad8e3c0a2cdd39624ad847099)
|
||||
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DSDL_TTF_SKIP_HEADERS=ON)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf/copyright)
|
Loading…
Reference in New Issue
Block a user