early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

47
externals/vcpkg/ports/gainput/fix-build.patch vendored Executable file
View File

@@ -0,0 +1,47 @@
set(XINPUT, "xinput") sets the variable "XINPUT," to "xinput",
so this variable is never used anyways
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a443b66..61ff7b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,11 +9,11 @@ option(GAINPUT_TESTS "Build Tests for Gainput" ON)
option(GAINPUT_BUILD_SHARED "BUILD_SHARED" ON)
option(GAINPUT_BUILD_STATIC "BUILD_STATIC" ON)
-if(!WIN32)
+if(NOT WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra")
else()
set(XINPUT "Xinput9_1_0")
- if ( ${CMAKE_SYSTEM_VERSION} LESS 6.1 )
+ if ( 0 )
set(XINPUT, "xinput")
endif()
endif()
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index cb7232f..a6ae3d9 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -55,15 +55,21 @@ elseif(APPLE)
find_library(FOUNDATION Foundation)
find_library(IOKIT IOKit)
find_library(GAME_CONTROLLER GameController)
+ if (GAINPUT_BUILD_SHARED)
target_link_libraries(gainput ${FOUNDATION} ${IOKIT} ${GAME_CONTROLLER})
+ endif()
if(IOS)
find_library(UIKIT UIKit)
find_library(COREMOTION CoreMotion)
find_library(QUARTZCORE QuartzCore)
+ if (GAINPUT_BUILD_SHARED)
target_link_libraries(gainput ${UIKIT} ${COREMOTION})
+ endif()
else()
find_library(APPKIT AppKit)
+ if (GAINPUT_BUILD_SHARED)
target_link_libraries(gainput ${APPKIT})
+ endif()
endif()
endif()

View File

@@ -0,0 +1,69 @@
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 14d5e85..cb7232f 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -30,19 +30,27 @@ if (GAINPUT_BUILD_SHARED)
endif (GAINPUT_BUILD_SHARED)
if (GAINPUT_BUILD_STATIC)
- message(STATUS "..Building shared libraries (-DGAINPUT_BUILD_STATIC=OFF to disable)")
+ message(STATUS "..Building static libraries (-DGAINPUT_BUILD_STATIC=OFF to disable)")
add_library(gainputstatic STATIC ${sources} ${mmsources})
set_target_properties(gainputstatic PROPERTIES DEBUG_POSTFIX -d FOLDER gainput)
set(install_libs ${install_libs} gainputstatic)
endif (GAINPUT_BUILD_STATIC)
if(WIN32)
- target_link_libraries(gainput ${XINPUT} ws2_32)
- target_link_libraries(gainputstatic ${XINPUT} ws2_32)
+ if (GAINPUT_BUILD_SHARED)
+ target_link_libraries(gainput ${XINPUT} ws2_32)
+ endif(GAINPUT_BUILD_SHARED)
+ if(GAINPUT_BUILD_STATIC)
+ target_link_libraries(gainputstatic ${XINPUT} ws2_32)
+ endif(GAINPUT_BUILD_STATIC)
add_definitions(-DGAINPUT_LIB_DYNAMIC=1)
elseif(ANDROID)
- target_link_libraries(gainputstatic native_app_glue log android)
- target_link_libraries(gainput native_app_glue log android)
+ if (GAINPUT_BUILD_SHARED)
+ target_link_libraries(gainput native_app_glue log android)
+ endif(GAINPUT_BUILD_SHARED)
+ if(GAINPUT_BUILD_STATIC)
+ target_link_libraries(gainputstatic native_app_glue log android)
+ endif(GAINPUT_BUILD_STATIC)
elseif(APPLE)
find_library(FOUNDATION Foundation)
find_library(IOKIT IOKit)
@@ -65,6 +73,14 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
+foreach(t ${install_libs})
+ target_include_directories(
+ ${t}
+ INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>
+ )
+endforeach()
+
install(
DIRECTORY "include/gainput"
DESTINATION "include"
@@ -73,7 +89,15 @@ install(
install(
TARGETS ${install_libs}
+ EXPORT unofficial-${PROJECT_NAME}-Targets
LIBRARY DESTINATION "${libdir}"
ARCHIVE DESTINATION "${libdir}"
RUNTIME DESTINATION "bin"
)
+
+install(
+ EXPORT unofficial-${PROJECT_NAME}-Targets
+ FILE unofficial-${PROJECT_NAME}Config.cmake
+ NAMESPACE unofficial::${PROJECT_NAME}::
+ DESTINATION share/unofficial-${PROJECT_NAME}
+)
\ No newline at end of file

34
externals/vcpkg/ports/gainput/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,34 @@
if (VCPKG_TARGET_IS_OSX)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO jkuhlmann/gainput
REF v1.0.0
SHA512 56fdc4c0613d7260861885b270ebe9e624e940175f41e3ac82516e2eb0d6d229e405fbcc2e54608e7d6751c1d8658b5b5e186153193badc6487274cb284a8cd6
HEAD_REF master
PATCHES
install_as_cmake_package.patch
fix-build.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" GAINPUT_BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" GAINPUT_BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DGAINPUT_BUILD_SHARED=${GAINPUT_BUILD_SHARED}
-DGAINPUT_BUILD_STATIC=${GAINPUT_BUILD_STATIC}
-DGAINPUT_TESTS=OFF
-DGAINPUT_SAMPLES=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-gainput CONFIG_PATH share/unofficial-gainput)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

19
externals/vcpkg/ports/gainput/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,19 @@
{
"name": "gainput",
"version": "1.0.0",
"port-version": 6,
"description": "Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers",
"homepage": "https://github.com/jkuhlmann/gainput",
"license": "MIT",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}