aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/spout2
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/spout2')
-rw-r--r--vcpkg/ports/spout2/fix-dx-keyed.patch18
-rw-r--r--vcpkg/ports/spout2/fix-include-path.patch48
-rw-r--r--vcpkg/ports/spout2/portfile.cmake48
-rw-r--r--vcpkg/ports/spout2/usage13
-rw-r--r--vcpkg/ports/spout2/vcpkg.json23
5 files changed, 150 insertions, 0 deletions
diff --git a/vcpkg/ports/spout2/fix-dx-keyed.patch b/vcpkg/ports/spout2/fix-dx-keyed.patch
new file mode 100644
index 0000000..08049a9
--- /dev/null
+++ b/vcpkg/ports/spout2/fix-dx-keyed.patch
@@ -0,0 +1,18 @@
+Subject: [PATCH] fix dx keyed
+---
+Index: SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.cpp
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.cpp b/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.cpp
+--- a/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.cpp (revision e16402c39ed2389692876d7bbd1c7d4a771a5b86)
++++ b/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.cpp (revision f3ba250699b87c8004a3430d6b00f3f537af0c0d)
+@@ -193,6 +193,7 @@
+ m_bSwapRB = false;
+ m_bAdapt = false; // Receiver switch to the sender's graphics adapter
+ m_bMemoryShare = GetMemoryShareMode(); // 2.006 memoryshare mode
++ m_bKeyed = false;
+
+ ZeroMemory(&m_SenderInfo, sizeof(SharedTextureInfo));
+ ZeroMemory(&m_ShExecInfo, sizeof(m_ShExecInfo));
diff --git a/vcpkg/ports/spout2/fix-include-path.patch b/vcpkg/ports/spout2/fix-include-path.patch
new file mode 100644
index 0000000..498eab3
--- /dev/null
+++ b/vcpkg/ports/spout2/fix-include-path.patch
@@ -0,0 +1,48 @@
+Subject: [PATCH] fixup for vcpkg
+---
+Index: SPOUTSDK/SpoutDirectX/SpoutDX/CMakeLists.txt
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/SPOUTSDK/SpoutDirectX/SpoutDX/CMakeLists.txt b/SPOUTSDK/SpoutDirectX/SpoutDX/CMakeLists.txt
+--- a/SPOUTSDK/SpoutDirectX/SpoutDX/CMakeLists.txt (revision 62362774c96547d63b502d7efd5cfbf138eb7570)
++++ b/SPOUTSDK/SpoutDirectX/SpoutDX/CMakeLists.txt (revision e16402c39ed2389692876d7bbd1c7d4a771a5b86)
+@@ -67,6 +67,10 @@
+ SPOUT_BUILD_DLL
+ SPOUTLIBRARY_EXPORTS
+ )
++
++
++target_include_directories(SpoutDX_static PRIVATE ../../)
++target_include_directories(SpoutDX PRIVATE ../../)
+ #/-------------------------------------- . -----------------------------------\#
+
+
+Index: SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.h
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.h b/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.h
+--- a/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.h (revision 62362774c96547d63b502d7efd5cfbf138eb7570)
++++ b/SPOUTSDK/SpoutDirectX/SpoutDX/SpoutDX.h (revision e16402c39ed2389692876d7bbd1c7d4a771a5b86)
+@@ -33,12 +33,12 @@
+ #define __spoutDX__
+
+ // Change the path as required
+-#include "..\..\SpoutGL\SpoutCommon.h" // for dll build
+-#include "..\..\SpoutGL\SpoutSenderNames.h" // for sender creation and update
+-#include "..\..\SpoutGL\SpoutDirectX.h" // for creating DX11 textures
+-#include "..\..\SpoutGL\SpoutFrameCount.h" // for mutex lock and new frame signal
+-#include "..\..\SpoutGL\SpoutCopy.h" // for pixel copy
+-#include "..\..\SpoutGL\SpoutUtils.h" // Registry utiities
++#include "SpoutGL\SpoutCommon.h" // for dll build
++#include "SpoutGL\SpoutSenderNames.h" // for sender creation and update
++#include "SpoutGL\SpoutDirectX.h" // for creating DX11 textures
++#include "SpoutGL\SpoutFrameCount.h" // for mutex lock and new frame signal
++#include "SpoutGL\SpoutCopy.h" // for pixel copy
++#include "SpoutGL\SpoutUtils.h" // Registry utiities
+
+ #include <direct.h> // for _getcwd
+ #include <TlHelp32.h> // for PROCESSENTRY32
diff --git a/vcpkg/ports/spout2/portfile.cmake b/vcpkg/ports/spout2/portfile.cmake
new file mode 100644
index 0000000..e9b0ad8
--- /dev/null
+++ b/vcpkg/ports/spout2/portfile.cmake
@@ -0,0 +1,48 @@
+# vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO leadedge/Spout2
+ REF 62362774c96547d63b502d7efd5cfbf138eb7570 #v2.007.010
+ SHA512 89d0dcec719c068e27c2f55605e4b45b32fe3a5e097c821b0aa45f4ee9284e63830bd741ac7bb1bff917190d9a51daa36b452580fc673c05767b7bfcbc9a494f
+ HEAD_REF master
+ PATCHES
+ fix-include-path.patch
+ fix-dx-keyed.patch
+)
+
+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()
diff --git a/vcpkg/ports/spout2/usage b/vcpkg/ports/spout2/usage
new file mode 100644
index 0000000..4f727e0
--- /dev/null
+++ b/vcpkg/ports/spout2/usage
@@ -0,0 +1,13 @@
+spout2 provides CMake targets:
+
+ # SpoutGL
+ find_package(Spout2 CONFIG REQUIRED)
+ target_link_libraries(main PRIVATE Spout2::Spout)
+ target_link_libraries(main PRIVATE Spout2::Spout_static)
+
+ # SpoutLibrary
+ target_link_libraries(main PRIVATE Spout2::SpoutLibrary)
+
+ # SpoutDX
+ target_link_libraries(main PRIVATE Spout2::SpoutDX)
+ target_link_libraries(main PRIVATE Spout2::SpoutDX_static)
diff --git a/vcpkg/ports/spout2/vcpkg.json b/vcpkg/ports/spout2/vcpkg.json
new file mode 100644
index 0000000..f43102f
--- /dev/null
+++ b/vcpkg/ports/spout2/vcpkg.json
@@ -0,0 +1,23 @@
+{
+ "name": "spout2",
+ "version-string": "2.007.010",
+ "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."
+ }
+ }
+}