mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-05 17:49:03 +08:00
0a262e7d61
* [sdl2] Update to 2.0.14
* Revert "[sdl2] Update to 2.0.14"
This reverts commit b8e82e0dac
.
* [sdl2] Update to 2.0.14
* [sdl2] Fix manifest formatting
* [sdl2] Change the shared library preprocessor symbol name to DLL_EXPORT for compatibility with SDL 2.0.14
Co-authored-by: Rémy Tassoux <rt2@rasterizedworld.com>
33 lines
895 B
CMake
33 lines
895 B
CMake
cmake_minimum_required(VERSION 3.0)
|
|
project(SDL2_TTF C)
|
|
|
|
find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
|
|
find_package(SDL2 CONFIG REQUIRED)
|
|
find_package(Freetype REQUIRED)
|
|
|
|
add_library(SDL2_ttf SDL_ttf.c version.rc)
|
|
|
|
set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL DLL_EXPORT)
|
|
target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIRS})
|
|
target_link_libraries(SDL2_ttf SDL2::SDL2 ${FREETYPE_LIBRARIES})
|
|
|
|
install(TARGETS SDL2_ttf
|
|
EXPORT SDL2_ttf
|
|
RUNTIME DESTINATION bin
|
|
ARCHIVE DESTINATION lib
|
|
LIBRARY DESTINATION lib)
|
|
|
|
INSTALL(EXPORT SDL2_ttf
|
|
DESTINATION "share/sdl2-ttf"
|
|
FILE sdl2-ttf-config.cmake
|
|
NAMESPACE SDL2::
|
|
)
|
|
|
|
if(NOT DEFINED SDL_TTF_SKIP_HEADERS)
|
|
install(FILES SDL_ttf.h DESTINATION include/SDL2)
|
|
endif()
|
|
|
|
message(STATUS "Link-time dependencies:")
|
|
message(STATUS " " SDL2::SDL2)
|
|
message(STATUS " " ${FREETYPE_LIBRARIES})
|