1
0

feature-whatsnew.cmake 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. utility/crypto-helpers-mbedtls.cpp
  19. utility/crypto-helpers.hpp
  20. utility/models/whatsnew.hpp
  21. utility/update-helpers.cpp
  22. utility/update-helpers.hpp
  23. utility/WhatsNewBrowserInitThread.cpp
  24. utility/WhatsNewBrowserInitThread.hpp
  25. utility/WhatsNewInfoThread.cpp
  26. utility/WhatsNewInfoThread.hpp
  27. )
  28. endif()
  29. target_enable_feature(obs-studio "What's New panel" WHATSNEW_ENABLED)
  30. endif()