build(cmake): check for MinHook during configure (#3533)
Co-authored-by: Lukas Senionis <22381748+FrogTheFrog@users.noreply.github.com>
This commit is contained in:
@@ -64,23 +64,27 @@ set(OPENSSL_LIBRARIES
|
|||||||
libcrypto.a)
|
libcrypto.a)
|
||||||
|
|
||||||
list(PREPEND PLATFORM_LIBRARIES
|
list(PREPEND PLATFORM_LIBRARIES
|
||||||
|
${CURL_STATIC_LIBRARIES}
|
||||||
|
avrt
|
||||||
|
d3d11
|
||||||
|
D3DCompiler
|
||||||
|
dwmapi
|
||||||
|
dxgi
|
||||||
|
iphlpapi
|
||||||
|
ksuser
|
||||||
|
libssp.a
|
||||||
libstdc++.a
|
libstdc++.a
|
||||||
libwinpthread.a
|
libwinpthread.a
|
||||||
libssp.a
|
minhook::minhook
|
||||||
|
nlohmann_json::nlohmann_json
|
||||||
ntdll
|
ntdll
|
||||||
ksuser
|
|
||||||
wsock32
|
|
||||||
ws2_32
|
|
||||||
d3d11 dxgi D3DCompiler
|
|
||||||
setupapi
|
setupapi
|
||||||
dwmapi
|
|
||||||
userenv
|
|
||||||
synchronization.lib
|
|
||||||
avrt
|
|
||||||
iphlpapi
|
|
||||||
shlwapi
|
shlwapi
|
||||||
PkgConfig::NLOHMANN_JSON
|
synchronization.lib
|
||||||
${CURL_STATIC_LIBRARIES})
|
userenv
|
||||||
|
ws2_32
|
||||||
|
wsock32
|
||||||
|
)
|
||||||
|
|
||||||
if(SUNSHINE_ENABLE_TRAY)
|
if(SUNSHINE_ENABLE_TRAY)
|
||||||
list(APPEND PLATFORM_TARGET_FILES
|
list(APPEND PLATFORM_TARGET_FILES
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS})
|
|||||||
# ffmpeg pre-compiled binaries
|
# ffmpeg pre-compiled binaries
|
||||||
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
|
if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl MinHook)
|
set(FFMPEG_PLATFORM_LIBRARIES mfplat ole32 strmiids mfuuid vpl)
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
|
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,4 +1,12 @@
|
|||||||
# windows specific dependencies
|
# windows specific dependencies
|
||||||
|
|
||||||
# nlohmann_json
|
# nlohmann_json
|
||||||
pkg_check_modules(NLOHMANN_JSON nlohmann_json REQUIRED IMPORTED_TARGET)
|
find_package(nlohmann_json CONFIG 3.11 REQUIRED)
|
||||||
|
|
||||||
|
# Make sure MinHook is installed
|
||||||
|
find_library(MINHOOK_LIBRARY minhook REQUIRED)
|
||||||
|
find_path(MINHOOK_INCLUDE_DIR MinHook.h PATH_SUFFIXES include REQUIRED)
|
||||||
|
|
||||||
|
add_library(minhook::minhook UNKNOWN IMPORTED)
|
||||||
|
set_property(TARGET minhook::minhook PROPERTY IMPORTED_LOCATION ${MINHOOK_LIBRARY})
|
||||||
|
target_include_directories(minhook::minhook INTERFACE ${MINHOOK_INCLUDE_DIR})
|
||||||
|
|||||||
Reference in New Issue
Block a user