2023-10-06 00:59:37 +02:00
|
|
|
cmake_minimum_required(VERSION 3.28...3.30)
|
2023-03-26 03:55:25 +02:00
|
|
|
|
2023-03-03 12:34:54 +01:00
|
|
|
find_package(zstd)
|
2023-07-22 00:10:59 +02:00
|
|
|
find_package(nlohmann_json 3 REQUIRED)
|
2023-03-26 03:55:25 +02:00
|
|
|
|
2022-03-16 23:11:58 +01:00
|
|
|
add_executable(updater WIN32)
|
|
|
|
|
|
|
|
target_sources(
|
|
|
|
updater
|
2023-03-26 03:55:25 +02:00
|
|
|
PRIVATE
|
|
|
|
hash.cpp
|
|
|
|
helpers.cpp
|
|
|
|
helpers.hpp
|
2022-03-16 23:11:58 +01:00
|
|
|
http.cpp
|
|
|
|
init-hook-files.c
|
2023-07-22 00:10:59 +02:00
|
|
|
manifest.hpp
|
2023-03-26 03:55:25 +02:00
|
|
|
patch.cpp
|
|
|
|
resource.h
|
|
|
|
updater.cpp
|
|
|
|
updater.hpp
|
2022-03-16 23:11:58 +01:00
|
|
|
updater.manifest
|
2023-03-26 03:55:25 +02:00
|
|
|
updater.rc
|
|
|
|
)
|
2022-03-16 23:11:58 +01:00
|
|
|
|
|
|
|
target_compile_definitions(updater PRIVATE NOMINMAX "PSAPI_VERSION=2")
|
2017-02-20 13:50:17 +01:00
|
|
|
|
2023-03-26 03:55:25 +02:00
|
|
|
target_include_directories(updater PRIVATE "${CMAKE_SOURCE_DIR}/libobs" "${CMAKE_SOURCE_DIR}/UI/win-update")
|
2017-02-20 13:50:17 +01:00
|
|
|
|
2024-06-09 23:31:44 +02:00
|
|
|
target_link_libraries(
|
|
|
|
updater
|
|
|
|
PRIVATE OBS::blake2_static nlohmann_json::nlohmann_json zstd::libzstd_static comctl32 shell32 version winhttp wintrust
|
|
|
|
)
|
2023-10-06 00:40:36 +02:00
|
|
|
|
|
|
|
# zstd is hardcoded with /DEFAULTLIB:LIBCMT
|
2024-06-13 01:48:41 +02:00
|
|
|
target_link_options(updater PRIVATE $<$<CONFIG:DEBUG>:/NODEFAULTLIB:LIBCMT>)
|
2022-03-16 23:11:58 +01:00
|
|
|
|
2024-06-09 23:35:40 +02:00
|
|
|
set_target_properties(
|
|
|
|
updater
|
2024-06-13 01:48:41 +02:00
|
|
|
PROPERTIES FOLDER frontend OUTPUT_NAME updater MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
|
|
|
|
)
|