diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-18 20:50:08 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2016-09-18 20:54:03 -0700 |
| commit | ccca198c1b1730b0241911cb56dc8e3504958b2a (patch) | |
| tree | a2dd9b8b087a09afdcecc5cbb3377bed15127eb2 /ports/sdl2 | |
| download | vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.tar.gz vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.zip | |
Initial commit
Diffstat (limited to 'ports/sdl2')
| -rw-r--r-- | ports/sdl2/CONTROL | 3 | ||||
| -rw-r--r-- | ports/sdl2/portfile.cmake | 43 |
2 files changed, 46 insertions, 0 deletions
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL new file mode 100644 index 000000000..5a05183f2 --- /dev/null +++ b/ports/sdl2/CONTROL @@ -0,0 +1,3 @@ +Source: sdl2 +Version: 2.0.4 +Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.
\ No newline at end of file diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake new file mode 100644 index 000000000..8d5a95feb --- /dev/null +++ b/ports/sdl2/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) +vcpkg_download_distfile(ARCHIVE_FILE + URL "http://libsdl.org/release/SDL2-2.0.4.tar.gz" + FILENAME "SDL2-2.0.4.tar.gz" + MD5 44fc4a023349933e7f5d7a582f7b886e +) +vcpkg_extract_source_archive(${ARCHIVE_FILE}) + +if(TRIPLET_SYSTEM_NAME MATCHES "WindowsStore") + vcpkg_build_msbuild( + PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj + ) + + file(COPY + ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.dll + ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY + ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.dll + ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Debug/SDL-UWP/SDL2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/VisualC-WinRT/UWP_VS2015/Release/SDL-UWP/SDL2.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/include DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(RENAME ${CURRENT_PACKAGES_DIR}/include/include ${CURRENT_PACKAGES_DIR}/include/SDL2) +else() + vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4 + OPTIONS + -DSDL_STATIC=OFF + ) + + vcpkg_build_cmake() + vcpkg_install_cmake() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +endif() + +file(INSTALL ${CURRENT_BUILDTREES_DIR}/src/SDL2-2.0.4/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright) +vcpkg_copy_pdbs() |
