stremio-community-v5/CMakeLists.txt
Zarg 416dab85cf Added advanced Browser Extensions Support
- Added extension domain whitelist gotten from extensions.json on github for allowed domains to navigate for browser extension usage. App allow these domain to be navigated to other are open externally.
- Added script Queue to run scripts on navigation complete
- Added "Home" navigate event arg, to navigate back to home page
- Added Back to Stremio button when not on Stremio page
- Partial permid support with custom patch. Still some features not working.
2025-02-02 03:13:22 +01:00

84 lines
No EOL
2.3 KiB
CMake

cmake_minimum_required(VERSION 3.16)
project(stremio VERSION "5.0.15")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
# Locate MPV
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
# 64-bit architecture
set(MPV_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/libmpv/x86_64/include")
set(MPV_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/deps/libmpv/x86_64/mpv.lib")
set(MPV_DLL "${CMAKE_CURRENT_SOURCE_DIR}/deps/libmpv/x86_64/libmpv-2.dll")
else()
# 32-bit architecture
set(MPV_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/deps/libmpv/i686/include")
set(MPV_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/deps/libmpv/i686/mpv.lib")
set(MPV_DLL "${CMAKE_CURRENT_SOURCE_DIR}/deps/libmpv/i686/libmpv-2.dll")
endif()
include_directories(${MPV_INCLUDE_DIR})
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
find_package(unofficial-webview2 CONFIG REQUIRED)
set(SOURCES
src/main.cpp
stremio.rc
src/core/globals.h
src/core/globals.cpp
src/utils/helpers.h
src/utils/helpers.cpp
src/utils/config.h
src/utils/config.cpp
src/utils/crashlog.h
src/utils/crashlog.cpp
src/mpv/player.h
src/mpv/player.cpp
src/node/server.cpp
src/node/server.h
src/tray/tray.h
src/tray/tray.cpp
src/ui/splash.h
src/ui/splash.cpp
src/updater/updater.cpp
src/updater/updater.h
src/webview/webview.h
src/webview/webview.cpp
src/ui/mainwindow.h
src/ui/mainwindow.cpp
src/resource.h
src/utils/extensions.cpp
src/utils/extensions.h
)
add_executable(${PROJECT_NAME} WIN32 ${SOURCES})
target_link_libraries(${PROJECT_NAME} PRIVATE
gdiplus.lib
dwmapi.lib
Shcore.lib
Msimg32.lib
winhttp.lib
shlwapi.lib
nlohmann_json::nlohmann_json
unofficial::webview2::webview2
OpenSSL::SSL
OpenSSL::Crypto
CURL::libcurl
${MPV_LIBRARY}
)
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>)
# Copy MPV DLL
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${MPV_DLL}"
$<TARGET_FILE_DIR:${PROJECT_NAME}>
)