mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 10:29:00 +08:00
25 lines
692 B
CMake
25 lines
692 B
CMake
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})
|