mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-24 10:14:13 -05:00
cmake: Fix OBS_COMMIT not being set (Windows only)
This commit is contained in:
@@ -42,6 +42,13 @@ add_library(OBS::update-helpers ALIAS obs-update-helpers)
|
||||
|
||||
target_sources(obs-update-helpers INTERFACE win-update/win-update-helpers.cpp win-update/win-update-helpers.hpp)
|
||||
target_include_directories(obs-update-helpers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/win-update")
|
||||
|
||||
# Set commit for untagged version comparisons in the Windows updater
|
||||
if(OBS_VERSION MATCHES ".+g[a-f0-9]+.*")
|
||||
string(REGEX REPLACE ".+g([a-f0-9]+).*$" "\\1" OBS_COMMIT ${OBS_VERSION})
|
||||
else()
|
||||
set(OBS_COMMIT "")
|
||||
endif()
|
||||
set_source_files_properties(update/win-update.cpp PROPERTIES COMPILE_DEFINITIONS OBS_COMMIT="${OBS_COMMIT}")
|
||||
|
||||
add_subdirectory(win-update/updater)
|
||||
|
||||
Reference in New Issue
Block a user