aboutsummaryrefslogtreecommitdiff
path: root/ports/gainput
diff options
context:
space:
mode:
authorPhoebe <925731795@qq.com>2019-09-06 01:43:09 +0800
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-05 10:43:09 -0700
commit33f15e40e858dcabddd1f1cc1b67368778516fbf (patch)
treea123c6cad05a70a19cb5b4f1370348e42e9cfb5b /ports/gainput
parente6564a5ad99d80cf77f4c269a73a049f17c845e2 (diff)
downloadvcpkg-33f15e40e858dcabddd1f1cc1b67368778516fbf.tar.gz
vcpkg-33f15e40e858dcabddd1f1cc1b67368778516fbf.zip
modernize many ports (#7986)
* modernize many ports * Update the code to handle copyright * Retriger to build qt5-gamepad
Diffstat (limited to 'ports/gainput')
-rw-r--r--ports/gainput/CONTROL2
-rw-r--r--ports/gainput/portfile.cmake28
2 files changed, 9 insertions, 21 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..6175acb17 100644
--- a/ports/gainput/portfile.cmake
+++ b/ports/gainput/portfile.cmake
@@ -1,17 +1,6 @@
-# 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"
@@ -19,15 +8,13 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
-
-
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
+ -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
@@ -35,8 +22,7 @@ vcpkg_configure_cmake(
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 +31,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