vcpkg/ports/sdl2-net/portfile.cmake
Helco 95785e1b40 [SDL2_xxx]: Add CMake targets for SDL2 addons (#5754)
* Add SDL2 image target

* Add SDL2_mixer target

* Add SDL2_ttf target

* Add SDL2_net target

* Fix missing source file for SDL2_image

* Disable harfbuzz for freetype properly

* Use both include dirs for freetype in SDL2-tff
2019-03-26 09:57:16 -07:00

26 lines
990 B
CMake

include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_net-2.0.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz"
FILENAME "SDL2_net-2.0.1.tar.gz"
SHA512 d27faee3cddc3592dae38947e6c1df0cbaa95f82fde9c87db6d11f6312d868cea74f6830ad07ceeb3d0d75e9424cebf39e54fddf9a1147e8d9e664609de92b7a)
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_NET_SKIP_HEADERS=ON)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH "share/sdl2-net")
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-net)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-net/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-net/copyright)