[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
This commit is contained in:
Jayesh Badwaik 2018-11-08 08:48:23 +01:00 committed by Robert Schumacher
parent 52b2759a75
commit 5459adf5de
5 changed files with 37 additions and 7 deletions

4
ports/pixel/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: pixel
Version: 0.2
Description: Simple 2D Graphics based on standard and portable OpenGL.
Build-Depends: glew, opengl, sdl2

View File

@ -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()

View File

@ -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.

View File

@ -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()

View File

@ -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()