CMakeLists.txt 1014 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. if(DISABLE_UPDATE_MODULE)
  2. return()
  3. endif()
  4. if(NOT DEFINED STATIC_ZLIB_PATH OR "${STATIC_ZLIB_PATH}" STREQUAL "")
  5. message(STATUS "STATIC_ZLIB_PATH not set, windows updater disabled")
  6. return()
  7. endif()
  8. project(updater)
  9. include_directories(${OBS_JANSSON_INCLUDE_DIRS})
  10. include_directories(${LIBLZMA_INCLUDE_DIRS})
  11. include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
  12. include_directories(${BLAKE2_INCLUDE_DIR})
  13. set(updater_HEADERS
  14. ../win-update-helpers.hpp
  15. resource.h
  16. updater.hpp
  17. )
  18. set(updater_SOURCES
  19. ../win-update-helpers.cpp
  20. init-hook-files.c
  21. updater.cpp
  22. patch.cpp
  23. http.cpp
  24. hash.cpp
  25. updater.rc
  26. updater.manifest
  27. )
  28. add_definitions(-DNOMINMAX -DUNICODE -D_UNICODE)
  29. if(MSVC)
  30. add_compile_options($<IF:$<CONFIG:Debug>,/MTd,/MT>)
  31. endif()
  32. add_executable(updater WIN32
  33. ${updater_HEADERS}
  34. ${updater_SOURCES}
  35. )
  36. target_link_libraries(updater
  37. ${OBS_JANSSON_IMPORT}
  38. ${STATIC_ZLIB_PATH}
  39. lzma
  40. blake2
  41. psapi
  42. comctl32
  43. shell32
  44. winhttp
  45. )
  46. set_target_properties(updater PROPERTIES FOLDER "frontend")