aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayesh Badwaik <jayeshbadwaik@users.noreply.github.com>2018-11-08 08:48:23 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-11-07 23:48:23 -0800
commit5459adf5decc9e64b7f0cf3b1ab57e2f2a636a87 (patch)
tree27e469d96f93f4e989a416720e99df470e9036e9
parent52b2759a75ddff09c088ee6fc7d0eba81a132991 (diff)
downloadvcpkg-5459adf5decc9e64b7f0cf3b1ab57e2f2a636a87.tar.gz
vcpkg-5459adf5decc9e64b7f0cf3b1ab57e2f2a636a87.zip
[pixel] added support for dascandy/pixel (#4637)
* + added support for dascandy/pixel * [pixel] Cleanup comments * [SDL2] Add SDL2::SDL2{,-static} wrapper * [pixel] update to v0.2 - fixes linking problem against SDL2 * [pixel] Bump control version
-rw-r--r--ports/pixel/CONTROL4
-rw-r--r--ports/pixel/portfile.cmake21
-rw-r--r--ports/sdl2/CONTROL2
-rw-r--r--ports/sdl2/portfile.cmake9
-rw-r--r--ports/sdl2/vcpkg-cmake-wrapper.cmake8
5 files changed, 37 insertions, 7 deletions
diff --git a/ports/pixel/CONTROL b/ports/pixel/CONTROL
new file mode 100644
index 000000000..a6445bea3
--- /dev/null
+++ b/ports/pixel/CONTROL
@@ -0,0 +1,4 @@
+Source: pixel
+Version: 0.2
+Description: Simple 2D Graphics based on standard and portable OpenGL.
+Build-Depends: glew, opengl, sdl2
diff --git a/ports/pixel/portfile.cmake b/ports/pixel/portfile.cmake
new file mode 100644
index 000000000..a00dc88f6
--- /dev/null
+++ b/ports/pixel/portfile.cmake
@@ -0,0 +1,21 @@
+include(vcpkg_common_functions)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dascandy/pixel
+ REF v0.2
+ SHA512 53485d298e34f8fda6c14dc07687e21281e4ef9d0567a654e5ded0589e1ac8e6bd84adbef922f0a12806f508c887299a6fc99c2415313029b8f7a6efc1cc3f59
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+)
+
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
+
+vcpkg_copy_pdbs()
diff --git a/ports/sdl2/CONTROL b/ports/sdl2/CONTROL
index 6f39484dd..397b81ed5 100644
--- a/ports/sdl2/CONTROL
+++ b/ports/sdl2/CONTROL
@@ -1,3 +1,3 @@
Source: sdl2
-Version: 2.0.8-1
+Version: 2.0.8-3
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.
diff --git a/ports/sdl2/portfile.cmake b/ports/sdl2/portfile.cmake
index 5d7ac5314..69d788fb0 100644
--- a/ports/sdl2/portfile.cmake
+++ b/ports/sdl2/portfile.cmake
@@ -6,13 +6,9 @@ vcpkg_from_github(
REF release-2.0.8
SHA512 5922dbeb14bb22991160251664b417d3f846867c18b5ecc1bd19c328ffd69b16252b7d45b9a317bafd1207fdb66d93a022dfb239e02447db9babd941956b6b37
HEAD_REF master
-)
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/export-symbols-only-in-shared-build.patch
- ${CMAKE_CURRENT_LIST_DIR}/enable-winrt-cmake.patch
+ export-symbols-only-in-shared-build.patch
+ enable-winrt-cmake.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC)
@@ -75,5 +71,6 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME)
endforeach()
endif()
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2)
file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2 RENAME copyright)
vcpkg_copy_pdbs()
diff --git a/ports/sdl2/vcpkg-cmake-wrapper.cmake b/ports/sdl2/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 000000000..c99178db1
--- /dev/null
+++ b/ports/sdl2/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,8 @@
+_find_package(${ARGS})
+if(TARGET SDL2::SDL2 AND NOT TARGET SDL2::SDL2-static)
+ add_library( SDL2::SDL2-static INTERFACE IMPORTED)
+ set_target_properties(SDL2::SDL2-static PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2")
+elseif(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
+ add_library( SDL2::SDL2 INTERFACE IMPORTED)
+ set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
+endif()