aboutsummaryrefslogtreecommitdiff
path: root/ports/gainput
diff options
context:
space:
mode:
Diffstat (limited to 'ports/gainput')
-rw-r--r--ports/gainput/CONTROL2
-rw-r--r--ports/gainput/portfile.cmake44
2 files changed, 15 insertions, 31 deletions
diff --git a/ports/gainput/CONTROL b/ports/gainput/CONTROL
index 65b347dee..834f5d6fc 100644
--- a/ports/gainput/CONTROL
+++ b/ports/gainput/CONTROL
@@ -1,4 +1,4 @@
Source: gainput
-Version: 1.0.0-1
+Version: 1.0.0-2
Homepage: https://github.com/jkuhlmann/gainput
Description: Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers
diff --git a/ports/gainput/portfile.cmake b/ports/gainput/portfile.cmake
index c1f1f6158..b84ed79dc 100644
--- a/ports/gainput/portfile.cmake
+++ b/ports/gainput/portfile.cmake
@@ -1,42 +1,24 @@
-# Common Ambient Variables:
-# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
-# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
-# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
-# PORT = current port name (zlib, etc)
-# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
-# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
-# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
-# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
-# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
-#
-
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/gainput-1.0.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://github.com/jkuhlmann/gainput/archive/v1.0.0.zip"
- FILENAME "gainput-1.0.0.zip"
- SHA512 dab221290560298693f54bebced1da5ec3dfae2d2adbfd6ceb17b5b28dc2a637a49e479d49fe98680915b29beb5dd2d5c74258598233a053230696186593c88e
-)
-vcpkg_extract_source_archive(${ARCHIVE})
-
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO jkuhlmann/gainput
+ REF v1.0.0
+ SHA512 56fdc4c0613d7260861885b270ebe9e624e940175f41e3ac82516e2eb0d6d229e405fbcc2e54608e7d6751c1d8658b5b5e186153193badc6487274cb284a8cd6
+ HEAD_REF master
+)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DGAINPUT_TESTS=OFF
- -DGAINPUT_SAMPLES=OFF
- # Disable this option if project cannot be built with Ninja
- # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
- # OPTIONS_RELEASE -DOPTIMIZE=1
- # OPTIONS_DEBUG -DDEBUGGABLE=1
+ PREFER_NINJA
+ OPTIONS
+ -DGAINPUT_TESTS=OFF
+ -DGAINPUT_SAMPLES=OFF
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
-# Handle copyright
-file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gainput RENAME copyright)
+
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
@@ -45,3 +27,5 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gainputstaticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gainputd.lib)
endif()
endif()
+
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file