mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 12:17:05 +08:00
[Spout2] New Port (#30119)
* Add Spout2 * Add Spout2 * Disable UWP * Fixup * Disable ARM64 * Disable ARM64 * Fix cmake config * Explain dx feature * Fix * vcpkg_check_features * FEATURE_OPTIONS * fixes * fixes * fixes * fixes * fixes * fixes
This commit is contained in:
parent
c4aa1a2435
commit
b12243bd33
45
ports/spout2/portfile.cmake
Normal file
45
ports/spout2/portfile.cmake
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
|
||||||
|
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO leadedge/Spout2
|
||||||
|
REF 9db0efadba16e1d884164d348f556922cfc80c50 #v2.007.009
|
||||||
|
SHA512 d45613590fb53155c90839cf6eb7fe646ef4ec463b6cd1624aff54870818f0bc4faccded78a6b2c089fa4e8756cf15c7e17def2ef32ac6c34144e562b58c5d8b
|
||||||
|
HEAD_REF master
|
||||||
|
)
|
||||||
|
|
||||||
|
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||||
|
list(APPEND OPTIONS -DSPOUT_BUILD_CMT=ON)
|
||||||
|
else()
|
||||||
|
list(APPEND OPTIONS -DSPOUT_BUILD_CMT=OFF)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
vcpkg_check_features(
|
||||||
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||||
|
FEATURES
|
||||||
|
dx SPOUT_BUILD_SPOUTDX
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_cmake_configure(
|
||||||
|
SOURCE_PATH "${SOURCE_PATH}"
|
||||||
|
OPTIONS
|
||||||
|
-DSKIP_INSTALL_ALL=OFF
|
||||||
|
${FEATURE_OPTIONS}
|
||||||
|
${OPTIONS}
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_cmake_install()
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
||||||
|
|
||||||
|
# Handle copyright & usage
|
||||||
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||||
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||||
|
|
||||||
|
# remove unneeded files
|
||||||
|
file(REMOVE_RECURSE
|
||||||
|
${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
|
||||||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||||
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||||
|
endif()
|
20
ports/spout2/usage
Normal file
20
ports/spout2/usage
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
spout2 provides CMake targets:
|
||||||
|
|
||||||
|
# Dynamic Linkage
|
||||||
|
find_package(Spout2 CONFIG REQUIRED)
|
||||||
|
target_link_libraries(main PRIVATE Spout2::Spout)
|
||||||
|
|
||||||
|
# Static Linkage
|
||||||
|
find_package(Spout2 CONFIG REQUIRED)
|
||||||
|
target_link_libraries(main PRIVATE Spout2::Spout_static)
|
||||||
|
|
||||||
|
# SpoutLibrary
|
||||||
|
target_link_libraries(main PRIVATE Spout2::SpoutLibrary)
|
||||||
|
|
||||||
|
# SpoutDX
|
||||||
|
target_link_libraries(main PRIVATE Spout2::SpoutDX)
|
||||||
|
|
||||||
|
Note: SpoutDX (`dx` feature) is not essential to use DirectX in Spout... It is a sub-set of the
|
||||||
|
Spout SDK for applications using DirectX rather than OpenGL. It doesn't mean enabling
|
||||||
|
DirectX ability for Spout. See https://github.com/leadedge/Spout2/tree/master/SPOUTSDK
|
||||||
|
It is more likely: 'Use only DirectX to implement Spout, and remove all codes that need OpenGL'.
|
23
ports/spout2/vcpkg.json
Normal file
23
ports/spout2/vcpkg.json
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "spout2",
|
||||||
|
"version-string": "2.007.009",
|
||||||
|
"description": "Spout is a video frame sharing system for Microsoft Windows, which allows applications to share OpenGL textures in a similar way to Syphon for the Mac.",
|
||||||
|
"homepage": "https://github.com/leadedge/Spout2",
|
||||||
|
"supports": "windows & !uwp & !arm64",
|
||||||
|
"dependencies": [
|
||||||
|
"opengl",
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake",
|
||||||
|
"host": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vcpkg-cmake-config",
|
||||||
|
"host": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"features": {
|
||||||
|
"dx": {
|
||||||
|
"description": "A sub-set of the Spout SDK for applications using DirectX rather than OpenGL."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -7480,6 +7480,10 @@
|
|||||||
"baseline": "0.4",
|
"baseline": "0.4",
|
||||||
"port-version": 0
|
"port-version": 0
|
||||||
},
|
},
|
||||||
|
"spout2": {
|
||||||
|
"baseline": "2.007.009",
|
||||||
|
"port-version": 0
|
||||||
|
},
|
||||||
"sprout": {
|
"sprout": {
|
||||||
"baseline": "2019-06-20",
|
"baseline": "2019-06-20",
|
||||||
"port-version": 1
|
"port-version": 1
|
||||||
|
9
versions/s-/spout2.json
Normal file
9
versions/s-/spout2.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "6f13bac00168667a3628277bf6301fa4a25c954c",
|
||||||
|
"version-string": "2.007.009",
|
||||||
|
"port-version": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user