feature-whatsnew.cmake 983 B

12345678910111213141516171819202122232425262728293031
  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. find_package(MbedTLS REQUIRED)
  8. find_package(nlohmann_json REQUIRED)
  9. if(NOT TARGET OBS::blake2)
  10. add_subdirectory("${CMAKE_SOURCE_DIR}/deps/blake2" "${CMAKE_BINARY_DIR}/deps/blake2")
  11. endif()
  12. target_link_libraries(obs-studio PRIVATE MbedTLS::MbedTLS nlohmann_json::nlohmann_json OBS::blake2)
  13. target_sources(
  14. obs-studio
  15. PRIVATE # cmake-format: sortable
  16. update/crypto-helpers-mbedtls.cpp
  17. update/crypto-helpers.hpp
  18. update/models/whatsnew.hpp
  19. update/shared-update.cpp
  20. update/shared-update.hpp
  21. update/update-helpers.cpp
  22. update/update-helpers.hpp)
  23. endif()
  24. target_enable_feature(obs-studio "What's New panel" WHATSNEW_ENABLED)
  25. endif()