mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-06 10:44:01 +00:00
[c-host] fixed project for cross compliation for Win on Linux
Thanks @fatalis for your guidance on this
This commit is contained in:
@@ -13,7 +13,7 @@ add_library(platform_Windows STATIC
|
||||
|
||||
add_subdirectory("capture")
|
||||
|
||||
FIND_PROGRAM(WINDRES_EXECUTABLE NAMES "windres.exe" DOC "windres executable")
|
||||
FIND_PROGRAM(WINDRES_EXECUTABLE NAMES "x86_64-w64-mingw32-windres" "windres.exe" DOC "windres executable")
|
||||
ADD_CUSTOM_COMMAND(TARGET platform_Windows POST_BUILD
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
|
||||
COMMAND ${WINDRES_EXECUTABLE} -i resource.rc -o "${PROJECT_BINARY_DIR}/resource.o"
|
||||
|
@@ -7,10 +7,12 @@ option(USE_NVFBC "Enable NVFBC Support" OFF)
|
||||
option(USE_DXGI "Enable DXGI Support" ON)
|
||||
|
||||
if(NOT DEFINED NVFBC_SDK)
|
||||
set(NVFBC_SDK "C:\\Program Files (x86)\\NVIDIA Corporation\\NVIDIA Capture SDK")
|
||||
set(NVFBC_SDK "C:/Program Files (x86)/NVIDIA Corporation/NVIDIA Capture SDK")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${NVFBC_SDK}\\inc" OR NOT IS_DIRECTORY "${NVFBC_SDK}\\inc")
|
||||
|
||||
file(TO_CMAKE_PATH "${NVFBC_SDK}" nvfbc_sdk)
|
||||
|
||||
if(NOT EXISTS "${nvfbc_sdk}/inc" OR NOT IS_DIRECTORY "${nvfbc_sdk}/inc")
|
||||
message("Disabling NVFBC support, can't find the SDK headers")
|
||||
set(USE_NVFBC OFF)
|
||||
endif()
|
||||
|
@@ -7,7 +7,7 @@ add_library(capture_DXGI STATIC
|
||||
|
||||
add_definitions("-DCOBJMACROS -DINITGUID")
|
||||
|
||||
FIND_PROGRAM(DLLTOOL_EXECUTABLE NAMES "dlltool.exe" DOC "dlltool executable")
|
||||
FIND_PROGRAM(DLLTOOL_EXECUTABLE NAMES "x86_64-w64-mingw32-dlltool" "dlltool" "dlltool.exe" DOC "dlltool executable")
|
||||
ADD_CUSTOM_COMMAND(TARGET capture_DXGI POST_BUILD
|
||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/dll"
|
||||
COMMAND ${DLLTOOL_EXECUTABLE} --def libd3d11.def --output-lib "${PROJECT_BINARY_DIR}/libd3d11.dll"
|
||||
|
@@ -26,8 +26,10 @@ HRESULT __stdcall CreateDXGIFactory1(REFIID riid, void **factory);
|
||||
#define D3D_FEATURE_LEVEL_12_0 0xc000
|
||||
#define D3D_FEATURE_LEVEL_12_1 0xc100
|
||||
|
||||
#ifndef __dxgicommon_h__
|
||||
#define DXGI_ERROR_ACCESS_LOST _HRESULT_TYPEDEF_(0x887A0026L)
|
||||
#define DXGI_ERROR_WAIT_TIMEOUT _HRESULT_TYPEDEF_(0x887A0027L)
|
||||
#endif
|
||||
|
||||
enum DXGI_OUTDUPL_POINTER_SHAPE_TYPE {
|
||||
DXGI_OUTDUPL_POINTER_SHAPE_TYPE_MONOCHROME = 1,
|
||||
@@ -188,6 +190,7 @@ typedef struct DXGI_MODE_DESC1
|
||||
}
|
||||
DXGI_MODE_DESC1;
|
||||
|
||||
#ifndef __dxgicommon_h__
|
||||
typedef enum DXGI_COLOR_SPACE_TYPE {
|
||||
DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0,
|
||||
DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 1,
|
||||
@@ -216,6 +219,7 @@ typedef enum DXGI_COLOR_SPACE_TYPE {
|
||||
DXGI_COLOR_SPACE_YCBCR_STUDIO_G24_TOPLEFT_P2020 = 24,
|
||||
DXGI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF
|
||||
} DXGI_COLOR_SPACE_TYPE;
|
||||
#endif
|
||||
|
||||
DEFINE_GUID(IID_IDXGIOutput1, 0x00cddea8, 0x939b, 0x4b83, 0xa3,0x40,0xa6,0x85,0x22,0x66,0x66,0xcc);
|
||||
|
||||
|
@@ -2,11 +2,12 @@ cmake_minimum_required(VERSION 3.0)
|
||||
project(capture_NVFBC LANGUAGES C CXX)
|
||||
|
||||
add_library(capture_NVFBC STATIC
|
||||
src/nvFBC.c
|
||||
src/nvfbc.c
|
||||
src/wrapper.cpp
|
||||
)
|
||||
|
||||
include_directories("${NVFBC_SDK}\\inc")
|
||||
file(TO_CMAKE_PATH "${NVFBC_SDK}" nvfbc_sdk)
|
||||
include_directories(file, "${nvfbc_sdk}/inc")
|
||||
|
||||
target_include_directories(capture_NVFBC
|
||||
PRIVATE
|
||||
|
Reference in New Issue
Block a user