CMakeLists.txt 1000 B

12345678910111213141516171819202122232425262728293031323334
  1. cmake_minimum_required(VERSION 3.24...3.25)
  2. legacy_check()
  3. find_package(zstd)
  4. find_package(nlohmann_json 3 REQUIRED)
  5. add_executable(updater WIN32)
  6. target_sources(
  7. updater
  8. PRIVATE hash.cpp
  9. helpers.cpp
  10. helpers.hpp
  11. http.cpp
  12. init-hook-files.c
  13. manifest.hpp
  14. patch.cpp
  15. resource.h
  16. updater.cpp
  17. updater.hpp
  18. updater.manifest
  19. updater.rc)
  20. target_compile_options(updater PRIVATE $<IF:$<CONFIG:DEBUG>,/MTd,/MT> "/utf-8")
  21. target_compile_definitions(updater PRIVATE NOMINMAX "PSAPI_VERSION=2")
  22. target_include_directories(updater PRIVATE "${CMAKE_SOURCE_DIR}/libobs" "${CMAKE_SOURCE_DIR}/UI/win-update")
  23. target_link_libraries(updater PRIVATE OBS::blake2 nlohmann_json::nlohmann_json zstd::libzstd_static comctl32 shell32
  24. winhttp)
  25. target_link_options(updater PRIVATE /IGNORE:4098)
  26. set_target_properties(updater PROPERTIES FOLDER frontend OUTPUT_NAME updater)