feature-whatsnew.cmake 1021 B

12345678910111213141516171819202122232425262728293031323334
  1. include_guard(DIRECTORY)
  2. option(ENABLE_WHATSNEW "Enable WhatsNew dialog" ON)
  3. if(ENABLE_WHATSNEW AND TARGET OBS::browser-panels)
  4. if(OS_MACOS)
  5. include(cmake/feature-macos-update.cmake)
  6. elseif(OS_LINUX)
  7. set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
  8. find_package(MbedTLS REQUIRED)
  9. set(CMAKE_FIND_PACKAGE_PREFER_CONFIG FALSE)
  10. find_package(nlohmann_json 3.11 REQUIRED)
  11. if(NOT TARGET OBS::blake2)
  12. add_subdirectory("${CMAKE_SOURCE_DIR}/deps/blake2" "${CMAKE_BINARY_DIR}/deps/blake2")
  13. endif()
  14. target_link_libraries(obs-studio PRIVATE MbedTLS::mbedtls nlohmann_json::nlohmann_json OBS::blake2)
  15. target_sources(
  16. obs-studio
  17. PRIVATE
  18. update/crypto-helpers-mbedtls.cpp
  19. update/crypto-helpers.hpp
  20. update/models/whatsnew.hpp
  21. update/shared-update.cpp
  22. update/shared-update.hpp
  23. update/update-helpers.cpp
  24. update/update-helpers.hpp
  25. )
  26. endif()
  27. target_enable_feature(obs-studio "What's New panel" WHATSNEW_ENABLED)
  28. endif()