aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Nerjes <david.nerjes@mailbox.org>2017-07-06 09:22:58 +0200
committerDavid Nerjes <david.nerjes@mailbox.org>2017-07-06 09:27:23 +0200
commit1eedcc9b00ae0c0fa4505e84cb0e1141e8c42696 (patch)
tree7d4b79a6bf1b82f197401e3f787840d3771728be
parentf17d5af64a8cb4ae18b1738923ffafeba708af75 (diff)
downloadvcpkg-1eedcc9b00ae0c0fa4505e84cb0e1141e8c42696.tar.gz
vcpkg-1eedcc9b00ae0c0fa4505e84cb0e1141e8c42696.zip
initial port of sdl2_gfx
-rw-r--r--ports/sdl2-gfx/CMakeLists.txt32
-rw-r--r--ports/sdl2-gfx/CONTROL4
-rw-r--r--ports/sdl2-gfx/portfile.cmake31
3 files changed, 67 insertions, 0 deletions
diff --git a/ports/sdl2-gfx/CMakeLists.txt b/ports/sdl2-gfx/CMakeLists.txt
new file mode 100644
index 000000000..7cc35ccb0
--- /dev/null
+++ b/ports/sdl2-gfx/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 3.0)
+project(SDL2_GFX C)
+
+find_path(SDL_INCLUDE_DIR SDL2/SDL.h)
+find_library(SDL_LIBRARY SDL2)
+
+# builtin formats
+set(SDL_GFX_DEFINES
+ WIN32
+ DLL_EXPORT)
+
+add_library(SDL2_gfx
+ SDL2_framerate.c
+ SDL2_gfxPrimitives.c
+ SDL2_imageFilter.c
+ SDL2_rotozoom.c)
+
+target_compile_definitions(SDL2_gfx PRIVATE ${SDL_GFX_DEFINES})
+target_include_directories(SDL2_gfx PRIVATE ${SDL_INCLUDE_DIR}/SDL2)
+target_link_libraries(SDL2_gfx ${SDL_LIBRARY})
+
+install(TARGETS SDL2_gfx
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+
+if(NOT SDL_GFX_SKIP_HEADERS)
+ install(FILES SDL2_framerate.h SDL2_gfxPrimitives.h SDL2_imageFilter.h SDL2_rotozoom.h SDL2_gfxPrimitives_font.h DESTINATION include/SDL2)
+endif()
+
+message(STATUS "Link-time dependencies:")
+message(STATUS " " ${SDL_LIBRARY})
diff --git a/ports/sdl2-gfx/CONTROL b/ports/sdl2-gfx/CONTROL
new file mode 100644
index 000000000..cecb70f0a
--- /dev/null
+++ b/ports/sdl2-gfx/CONTROL
@@ -0,0 +1,4 @@
+Source: sdl2-gfx
+Version: 1.0.3
+Build-Depends: sdl2
+Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer.
diff --git a/ports/sdl2-gfx/portfile.cmake b/ports/sdl2-gfx/portfile.cmake
new file mode 100644
index 000000000..50c23372b
--- /dev/null
+++ b/ports/sdl2-gfx/portfile.cmake
@@ -0,0 +1,31 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SDL2_gfx-1.0.3)
+vcpkg_download_distfile(ARCHIVE
+ URLS "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.3.zip"
+ FILENAME "SDL2_gfx-1.0.3.zip"
+ SHA512 f68485f71acf979aba68f3575f260fbc95a59496a9639498bcff80ffbfdb157c82a44bb5a0b0e3b1e157376ea4ff2f196f50466e6f24d850f94cfe7c24b1a497
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl2-gfx/copyright)
+
+vcpkg_copy_pdbs() \ No newline at end of file