yolobs-studio/UI/win-update/updater/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.1 KiB
CMake
Raw Normal View History

2017-06-29 19:01:10 +00:00
if(DISABLE_UPDATE_MODULE)
return()
endif()
2017-04-19 19:54:15 +00:00
if(NOT DEFINED STATIC_ZLIB_PATH OR "${STATIC_ZLIB_PATH}" STREQUAL "")
message(STATUS "STATIC_ZLIB_PATH not set, windows updater disabled")
return()
endif()
project(updater)
include_directories(${LIBLZMA_INCLUDE_DIRS})
2020-12-22 17:32:50 +00:00
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/deps/json11")
2017-04-19 19:54:15 +00:00
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/libobs")
include_directories(${BLAKE2_INCLUDE_DIR})
set(updater_HEADERS
2020-12-22 17:32:50 +00:00
${CMAKE_SOURCE_DIR}/deps/json11/json11.hpp
2017-04-19 19:54:15 +00:00
../win-update-helpers.hpp
resource.h
updater.hpp
)
set(updater_SOURCES
2020-12-22 17:32:50 +00:00
${CMAKE_SOURCE_DIR}/deps/json11/json11.cpp
2017-04-19 19:54:15 +00:00
../win-update-helpers.cpp
2020-03-25 08:07:22 +00:00
init-hook-files.c
2017-04-19 19:54:15 +00:00
updater.cpp
patch.cpp
http.cpp
hash.cpp
updater.rc
2019-07-27 12:47:10 +00:00
updater.manifest
2017-04-19 19:54:15 +00:00
)
add_definitions(-DNOMINMAX -DUNICODE -D_UNICODE)
if(MSVC)
2019-07-27 12:47:10 +00:00
add_compile_options($<IF:$<CONFIG:Debug>,/MTd,/MT>)
2017-04-19 19:54:15 +00:00
endif()
add_executable(updater WIN32
${updater_HEADERS}
${updater_SOURCES}
)
target_link_libraries(updater
${STATIC_ZLIB_PATH}
lzma
blake2
psapi
comctl32
shell32
winhttp
)
2020-10-01 20:15:25 +00:00
set_target_properties(updater PROPERTIES FOLDER "frontend")