aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/pixel
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/pixel
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/pixel')
-rw-r--r--vcpkg/ports/pixel/001-prevent-examples.patch38
-rw-r--r--vcpkg/ports/pixel/portfile.cmake29
-rw-r--r--vcpkg/ports/pixel/vcpkg.json28
3 files changed, 95 insertions, 0 deletions
diff --git a/vcpkg/ports/pixel/001-prevent-examples.patch b/vcpkg/ports/pixel/001-prevent-examples.patch
new file mode 100644
index 0000000..ec958f8
--- /dev/null
+++ b/vcpkg/ports/pixel/001-prevent-examples.patch
@@ -0,0 +1,38 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b910231..71f7ddf 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,6 +34,8 @@ else()
+ target_link_libraries(pixel PUBLIC SDL2::SDL2)
+ endif()
+
++option(BUILD_EXAMPLES "Build examples" OFF)
++if(BUILD_EXAMPLES)
+ add_executable(image_swap examples/image_swap/src/image_swap.cpp)
+ target_link_libraries(image_swap PRIVATE pixel)
+ add_executable(randomdots examples/randomdots/src/randomdots.cpp)
+@@ -50,7 +52,11 @@ add_executable(simple examples/simple/src/simple.cpp)
+ target_link_libraries(simple PRIVATE pixel)
+ add_executable(starfield examples/starfield/src/starfield.cpp)
+ target_link_libraries(starfield PRIVATE pixel)
++endif()
+
++if(MSVC)
++ add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
++endif()
+
+ # Install Section
+ include(GNUInstallDirs)
+@@ -87,12 +93,6 @@ install(
+ DESTINATION ${CMAKE_INSTALL_PREFIX}
+ )
+
+-install(
+- FILES
+- ${PROJECT_SOURCE_DIR}/LICENSE
+- DESTINATION ${CMAKE_INSTALL_DATADIR}/pixel/copyright
+- )
+-
+ install(
+ FILES
+ ${PROJECT_BINARY_DIR}/pixelConfig.cmake
diff --git a/vcpkg/ports/pixel/portfile.cmake b/vcpkg/ports/pixel/portfile.cmake
new file mode 100644
index 0000000..36c5424
--- /dev/null
+++ b/vcpkg/ports/pixel/portfile.cmake
@@ -0,0 +1,29 @@
+if(VCPKG_TARGET_IS_LINUX)
+ message(WARNING "${PORT} currently requires libglu1-mesa from the system package manager:
+ This can be installed on Ubuntu systems via sudo apt install libglu1-mesa-dev")
+endif()
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO dascandy/pixel
+ REF c4411f67746fdd811aa5f8c102ac340e9eaf4ec5
+ SHA512 e4f704c076bb61220349524b0b1033a92c44128bb81e79dbd32ea2d1aa9d4abb0d6daab3617f69b59d1c1e50d750767153174fea015d8718804612f4d9f68ff6
+ HEAD_REF master
+ PATCHES
+ 001-prevent-examples.patch
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DBUILD_EXAMPLES=OFF
+)
+
+vcpkg_cmake_install()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+vcpkg_copy_pdbs()
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/pixel/vcpkg.json b/vcpkg/ports/pixel/vcpkg.json
new file mode 100644
index 0000000..cc01890
--- /dev/null
+++ b/vcpkg/ports/pixel/vcpkg.json
@@ -0,0 +1,28 @@
+{
+ "name": "pixel",
+ "version-date": "2022-03-15",
+ "port-version": 1,
+ "description": "Simple 2D Graphics based on standard and portable OpenGL.",
+ "homepage": "https://github.com/dascandy/pixel",
+ "license": "Apache-2.0",
+ "dependencies": [
+ "glew",
+ "opengl",
+ {
+ "name": "sdl2",
+ "default-features": false,
+ "features": [
+ "x11"
+ ],
+ "platform": "linux"
+ },
+ {
+ "name": "sdl2",
+ "platform": "!linux"
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}