Skip to content

Commit 40a0c85

Browse files
Build fix after the merge
1 parent 7bff055 commit 40a0c85

File tree

28 files changed

+222
-216
lines changed

28 files changed

+222
-216
lines changed

.gersemirc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# yaml-language-server: $schema=https://raw.githubusercontent.com/BlankSpruce/gersemi/master/gersemi/configuration.schema.json
22

3-
color: false
43
definitions: []
54
line_length: 120
65
indent: 2
76
list_expansion: favour-inlining
8-
quiet: false
97
unsafe: false
10-
workers: 10
11-
warn_about_unknown_commands: false
8+
warn_about_unknown_commands: false

.github/workflows/build-project.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ jobs:
383383
name: Windows 🪟
384384
strategy:
385385
matrix:
386-
architecture: [x64, arm64]
386+
architecture: [x64] # TODO: it was [x64, arm64]
387387
runs-on: windows-2022
388388
needs: check-event
389389
env:

CMakeLists.txt

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include(compilerconfig)
1515
include(defaults)
1616
include(helpers)
1717

18-
option(ENABLE_UI "Enable building with UI (requires Qt)" OFF)
18+
option(ENABLE_UI "Enable building with UI (requires Qt)" OFF)
1919
option(ENABLE_SCRIPTING "Enable scripting support" ON)
2020
option(ENABLE_HEVC "Enable HEVC encoders" ON)
2121

@@ -31,22 +31,25 @@ add_subdirectory(test/test-input)
3131

3232
add_subdirectory(frontend)
3333

34-
if(WIN32)
35-
include(FetchContent)
36-
37-
# Compare current linked libs with prev
38-
FetchContent_Declare(
39-
deps_checker
40-
URL "https://raw.githubusercontent.com/stream-labs/obs-studio-node/staging/dependency_checker/check_dependencies.cmd"
41-
DOWNLOAD_NO_EXTRACT true)
42-
FetchContent_MakeAvailable(deps_checker)
43-
44-
add_custom_target(
45-
check_dependencies
46-
COMMAND
47-
${CMAKE_COMMAND} "-Ddeps_checker_SOURCE_DIR=${deps_checker_SOURCE_DIR}" "-Ddeps_CONFIGURATION=$<CONFIGURATION>"
48-
"-Ddeps_CONFIG=$<CONFIG>" "-Ddeps_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}" -P
49-
"${CMAKE_SOURCE_DIR}/slobs_CI/check_libraries.cmake")
50-
endif()
34+
if(WIN32)
35+
include(FetchContent)
36+
37+
# Compare current linked libs with prev
38+
FetchContent_Declare(
39+
deps_checker
40+
URL
41+
"https://raw.githubusercontent.com/stream-labs/obs-studio-node/staging/dependency_checker/check_dependencies.cmd"
42+
DOWNLOAD_NO_EXTRACT true
43+
)
44+
FetchContent_MakeAvailable(deps_checker)
45+
46+
add_custom_target(
47+
check_dependencies
48+
COMMAND
49+
${CMAKE_COMMAND} "-Ddeps_checker_SOURCE_DIR=${deps_checker_SOURCE_DIR}" "-Ddeps_CONFIGURATION=$<CONFIGURATION>"
50+
"-Ddeps_CONFIG=$<CONFIG>" "-Ddeps_CMAKE_SOURCE_DIR=${CMAKE_SOURCE_DIR}" -P
51+
"${CMAKE_SOURCE_DIR}/slobs_CI/check_libraries.cmake"
52+
)
53+
endif()
5154

5255
message_configuration()

CMakePresets.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@
169169
"displayName": "Windows on ARM 64-bit",
170170
"description": "Windows build for ARM 64-bit (aka ARM64)",
171171
"configuration": "RelWithDebInfo"
172+
},
173+
{
174+
"name": "macos",
175+
"configurePreset": "macos",
176+
"displayName": "MacOS",
177+
"description": "Default macOS build (single architecture only)",
178+
"configuration": "RelWithDebInfo"
172179
}
173180
]
174181
}

build-aux/.run-format.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ invoke_formatter() {
103103
}
104104

105105
if (( ! #source_files )) source_files=(CMakeLists.txt (libobs|libobs-*|frontend|plugins|deps|shared|cmake|test)/**/(CMakeLists.txt|*.cmake)(.N))
106-
# TODO: remove obs-ffmpeg and obs-nvenc from the list below after the OBS 31 merge
107-
source_files=(${source_files:#*/(obs-outputs/ftl-sdk|jansson|decklink/*/decklink-sdk|obs-websocket|obs-browser|win-dshow/libdshowcapture|obs-ffmpeg|obs-nvenc)/*})
106+
107+
source_files=(${source_files:#*/(obs-outputs/ftl-sdk|jansson|decklink/*/decklink-sdk|obs-websocket|obs-browser|win-dshow/libdshowcapture)/*})
108108
source_files=(${source_files:#(cmake/Modules/*|*/legacy.cmake)})
109109

110110
check_files() {

buildspec.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@
1414
}
1515
},
1616
"qt6": {
17-
"version": "2025-07-11sl4",
17+
"version": "2025-08-23",
1818
"baseUrl": "https://obs-studio-deployment.s3-us-west-2.amazonaws.com",
1919
"label": "Pre-Built Qt6",
2020
"hashes": {
21-
"macos-x86_64": "f3ac5bba3999889d8eac478b8587300ba910c68d32d271e6ba41aa11215c6b8f",
22-
"macos-arm64": "b7b33526925b8d684ffade0384269ca7fca3e3b19301ab5dc69ced8b01ce3bcc",
23-
"macos-universal": "1352299814ad646f8013dbf16f6e584c1560839e90f7100526e41edb3136cc94"
21+
"macos-universal": "990f11638b80a4509e14e8c315f6e4caa0861e37fcd3113a256fbff835ffca29"
2422
}
2523
},
2624
"cef": {

cmake/common/buildspec_common.cmake

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ function(extract_archive file destination)
1717
execute_process(
1818
COMMAND 7z x "${file}" -o"${destination}" -y
1919
RESULT_VARIABLE _result
20-
OUTPUT_QUIET ERROR_QUIET)
20+
OUTPUT_QUIET
21+
ERROR_QUIET
22+
)
2123
if(NOT _result EQUAL 0)
2224
message(FATAL_ERROR "Failed to extract .7z archive: ${file}")
2325
endif()
@@ -217,34 +219,62 @@ function(_check_dependencies)
217219
string(REPLACE "VERSION" "${version}" libmediasoupclient_subdir "${libmediasoupclient_subdir}")
218220
string(REPLACE "ARCH" "${arch}" libmediasoupclient_subdir "${libmediasoupclient_subdir}")
219221
endif()
220-
set(LIBMEDIASOUPCLIENT_PATH
221-
"${dependencies_dir}/${libmediasoupclient_subdir}"
222-
CACHE PATH "libmediasoupclient directory" FORCE)
222+
set(
223+
LIBMEDIASOUPCLIENT_PATH
224+
"${dependencies_dir}/${libmediasoupclient_subdir}"
225+
CACHE PATH
226+
"libmediasoupclient directory"
227+
FORCE
228+
)
223229

224-
set(MEDIASOUP_INCLUDE_PATH
225-
"${dependencies_dir}/${libmediasoupclient_subdir}/include/mediasoupclient/"
226-
CACHE PATH "libmediasoupclient include directory" FORCE)
230+
set(
231+
MEDIASOUP_INCLUDE_PATH
232+
"${dependencies_dir}/${libmediasoupclient_subdir}/include/mediasoupclient/"
233+
CACHE PATH
234+
"libmediasoupclient include directory"
235+
FORCE
236+
)
227237
if(WIN32)
228-
set(MEDIASOUP_LIB_PATH
229-
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/mediasoupclient.lib"
230-
CACHE PATH "libmediasoupclient lib directory" FORCE)
238+
set(
239+
MEDIASOUP_LIB_PATH
240+
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/mediasoupclient.lib"
241+
CACHE PATH
242+
"libmediasoupclient lib directory"
243+
FORCE
244+
)
231245
elseif(APPLE)
232-
set(MEDIASOUP_LIB_PATH
233-
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/libmediasoupclient.a"
234-
CACHE PATH "libmediasoupclient lib directory" FORCE)
246+
set(
247+
MEDIASOUP_LIB_PATH
248+
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/libmediasoupclient.a"
249+
CACHE PATH
250+
"libmediasoupclient lib directory"
251+
FORCE
252+
)
235253
endif()
236254

237-
set(MEDIASOUP_SDP_INCLUDE_PATH
238-
"${dependencies_dir}/${libmediasoupclient_subdir}/include/sdptransform"
239-
CACHE PATH "libmediasoupclient sdp include directory" FORCE)
255+
set(
256+
MEDIASOUP_SDP_INCLUDE_PATH
257+
"${dependencies_dir}/${libmediasoupclient_subdir}/include/sdptransform"
258+
CACHE PATH
259+
"libmediasoupclient sdp include directory"
260+
FORCE
261+
)
240262
if(WIN32)
241-
set(MEDIASOUP_SDP_LIB_PATH
242-
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/sdptransform.lib"
243-
CACHE PATH "libmediasoupclient sdp lib directory" FORCE)
263+
set(
264+
MEDIASOUP_SDP_LIB_PATH
265+
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/sdptransform.lib"
266+
CACHE PATH
267+
"libmediasoupclient sdp lib directory"
268+
FORCE
269+
)
244270
elseif(APPLE)
245-
set(MEDIASOUP_SDP_LIB_PATH
246-
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/libsdptransform.a"
247-
CACHE PATH "libmediasoupclient sdp lib directory" FORCE)
271+
set(
272+
MEDIASOUP_SDP_LIB_PATH
273+
"${dependencies_dir}/${libmediasoupclient_subdir}/lib/libsdptransform.a"
274+
CACHE PATH
275+
"libmediasoupclient sdp lib directory"
276+
FORCE
277+
)
248278
endif()
249279
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}/${libmediasoupclient_subdir}")
250280
elseif(dependency STREQUAL webrtc)
@@ -256,31 +286,19 @@ function(_check_dependencies)
256286
string(REPLACE "ARCH" "${arch}" webrtc_subdir "${webrtc_subdir}")
257287
endif()
258288

259-
set(WEBRTC_PATH
260-
"${dependencies_dir}/${webrtc_subdir}"
261-
CACHE PATH "webrtc directory" FORCE)
289+
set(WEBRTC_PATH "${dependencies_dir}/${webrtc_subdir}" CACHE PATH "webrtc directory" FORCE)
262290

263-
set(WEBRTC_INCLUDE_PATH
264-
"${dependencies_dir}/${webrtc_subdir}"
265-
CACHE PATH "webrtc include directory" FORCE)
291+
set(WEBRTC_INCLUDE_PATH "${dependencies_dir}/${webrtc_subdir}" CACHE PATH "webrtc include directory" FORCE)
266292
if(WIN32)
267-
set(WEBRTC_LIB_PATH
268-
"${dependencies_dir}/${webrtc_subdir}/webrtc.lib"
269-
CACHE PATH "webrtc lib path" FORCE)
293+
set(WEBRTC_LIB_PATH "${dependencies_dir}/${webrtc_subdir}/webrtc.lib" CACHE PATH "webrtc lib path" FORCE)
270294
elseif(APPLE)
271-
set(WEBRTC_LIB_PATH
272-
"${dependencies_dir}/${webrtc_subdir}/libwebrtc.a"
273-
CACHE PATH "webrtc lib path" FORCE)
295+
set(WEBRTC_LIB_PATH "${dependencies_dir}/${webrtc_subdir}/libwebrtc.a" CACHE PATH "webrtc lib path" FORCE)
274296
endif()
275297
list(APPEND CMAKE_PREFIX_PATH "${dependencies_dir}/${webrtc_subdir}")
276298
elseif(dependency STREQUAL grpc)
277299
set(grpc_subdir "grpc-release-${version}")
278-
set(Protobuf_DIR
279-
"${dependencies_dir}/${grpc_subdir}/cmake"
280-
CACHE PATH "Protobuf directory" FORCE)
281-
set(GRPC_PATH
282-
"${dependencies_dir}/${grpc_subdir}"
283-
CACHE PATH "GRPC directory" FORCE)
300+
set(Protobuf_DIR "${dependencies_dir}/${grpc_subdir}/cmake" CACHE PATH "Protobuf directory" FORCE)
301+
set(GRPC_PATH "${dependencies_dir}/${grpc_subdir}" CACHE PATH "GRPC directory" FORCE)
284302

285303
list(APPEND CMAKE_PREFIX_PATH "${GRPC_PATH}")
286304

@@ -292,30 +310,16 @@ function(_check_dependencies)
292310
string(REPLACE "VERSION" "${version}" openssl_subdir "${openssl_subdir}")
293311
string(REPLACE "ARCH" "${arch}" openssl_subdir "${openssl_subdir}")
294312

295-
set(OPENSSL_PATH
296-
"${dependencies_dir}/${openssl_subdir}"
297-
CACHE PATH "openssl directory" FORCE)
313+
set(OPENSSL_PATH "${dependencies_dir}/${openssl_subdir}" CACHE PATH "openssl directory" FORCE)
298314

299-
set(OPENSSL_INCLUDE_PATH
300-
"${OPENSSL_PATH}/include"
301-
CACHE PATH "openssl include directory" FORCE)
302-
set(OPENSSL_LIB_PATH
303-
"${OPENSSL_PATH}/lib/libssl.a"
304-
CACHE PATH "openssl SSL library path" FORCE)
305-
set(OPENSSL_CRYPTO_LIB_PATH
306-
"${OPENSSL_PATH}/lib/libcrypto.a"
307-
CACHE PATH "openssl Crypto library path" FORCE)
315+
set(OPENSSL_INCLUDE_PATH "${OPENSSL_PATH}/include" CACHE PATH "openssl include directory" FORCE)
316+
set(OPENSSL_LIB_PATH "${OPENSSL_PATH}/lib/libssl.a" CACHE PATH "openssl SSL library path" FORCE)
317+
set(OPENSSL_CRYPTO_LIB_PATH "${OPENSSL_PATH}/lib/libcrypto.a" CACHE PATH "openssl Crypto library path" FORCE)
308318

309319
# Explicitly set CMake variables for OpenSSL
310-
set(OPENSSL_ROOT_DIR
311-
"${OPENSSL_PATH}"
312-
CACHE PATH "OpenSSL root directory" FORCE)
313-
set(OPENSSL_INCLUDE_DIR
314-
"${OPENSSL_INCLUDE_PATH}"
315-
CACHE PATH "OpenSSL include directory" FORCE)
316-
set(OPENSSL_LIBRARIES
317-
"${OPENSSL_LIB_PATH};${OPENSSL_CRYPTO_LIB_PATH}"
318-
CACHE PATH "OpenSSL libraries" FORCE)
320+
set(OPENSSL_ROOT_DIR "${OPENSSL_PATH}" CACHE PATH "OpenSSL root directory" FORCE)
321+
set(OPENSSL_INCLUDE_DIR "${OPENSSL_INCLUDE_PATH}" CACHE PATH "OpenSSL include directory" FORCE)
322+
set(OPENSSL_LIBRARIES "${OPENSSL_LIB_PATH};${OPENSSL_CRYPTO_LIB_PATH}" CACHE PATH "OpenSSL libraries" FORCE)
319323

320324
list(APPEND CMAKE_PREFIX_PATH "${OPENSSL_PATH}")
321325

cmake/common/helpers_common.cmake

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,17 @@ function(target_export target)
304304
install(
305305
TARGETS ${target}
306306
EXPORT ${target}Targets
307-
RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}" COMPONENT Development ${exclude_variant}
308-
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Development ${exclude_variant}
309-
ARCHIVE DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Development ${exclude_variant}
310-
FRAMEWORK DESTINATION Frameworks COMPONENT Development ${exclude_variant}
307+
RUNTIME DESTINATION "${OBS_EXECUTABLE_DESTINATION}" COMPONENT Development
308+
${exclude_variant}
309+
LIBRARY DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Development
310+
${exclude_variant}
311+
ARCHIVE DESTINATION "${OBS_LIBRARY_DESTINATION}" COMPONENT Development
312+
${exclude_variant}
313+
FRAMEWORK DESTINATION Frameworks COMPONENT Development
314+
${exclude_variant}
311315
INCLUDES DESTINATION "${include_destination}"
312-
PUBLIC_HEADER DESTINATION "${include_destination}" COMPONENT Development ${exclude_variant}
316+
PUBLIC_HEADER DESTINATION "${include_destination}" COMPONENT Development
317+
${exclude_variant}
313318
)
314319

315320
get_target_property(obs_public_headers ${target} OBS_PUBLIC_HEADERS)
@@ -328,7 +333,7 @@ function(target_export target)
328333
endforeach()
329334

330335
foreach(header_dir IN LISTS header_dirs)
331-
message(STATUS "Exporting public headers dir ${header_dir}")
336+
message(STATUS "Exporting public headers dir ${header_dir}")
332337
install(
333338
FILES ${headers_${header_dir}}
334339
DESTINATION "${include_destination}/${header_dir}"

cmake/finders/FindFFmpeg.cmake

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,7 @@ macro(FFmpeg_find_dll)
191191
endif()
192192

193193
if(NOT FFmpeg_FFMPEG_EXECUTABLE)
194-
find_program(
195-
FFmpeg_FFMPEG_EXECUTABLE
196-
NAMES ffmpeg.exe
197-
HINTS ${_implib_path} ${_bin_path}
198-
DOC "Path to ffmpeg.exe"
199-
)
194+
find_program(FFmpeg_FFMPEG_EXECUTABLE NAMES ffmpeg.exe HINTS ${_implib_path} ${_bin_path} DOC "Path to ffmpeg.exe")
200195
endif()
201196

202197
if(NOT FFmpeg_FFPROBE_EXECUTABLE)
@@ -310,36 +305,22 @@ endif()
310305

311306
if(NOT WIN32)
312307
if(NOT FFmpeg_FFMPEG_EXECUTABLE)
313-
find_program(
314-
FFmpeg_FFMPEG_EXECUTABLE
315-
NAMES ffmpeg
316-
DOC "Path to ffmpeg (non-Windows fallback)"
317-
)
308+
find_program(FFmpeg_FFMPEG_EXECUTABLE NAMES ffmpeg DOC "Path to ffmpeg (non-Windows fallback)")
318309
endif()
319310

320311
if(NOT FFmpeg_FFPROBE_EXECUTABLE)
321-
find_program(
322-
FFmpeg_FFPROBE_EXECUTABLE
323-
NAMES ffprobe
324-
DOC "Path to ffprobe (non-Windows fallback)"
325-
)
312+
find_program(FFmpeg_FFPROBE_EXECUTABLE NAMES ffprobe DOC "Path to ffprobe (non-Windows fallback)")
326313
endif()
327314
endif()
328315

329316
if(FFmpeg_FFMPEG_EXECUTABLE AND NOT TARGET FFmpeg::ffmpegexe)
330317
add_executable(FFmpeg::ffmpegexe IMPORTED)
331-
set_target_properties(FFmpeg::ffmpegexe
332-
PROPERTIES
333-
IMPORTED_LOCATION "${FFmpeg_FFMPEG_EXECUTABLE}"
334-
)
318+
set_target_properties(FFmpeg::ffmpegexe PROPERTIES IMPORTED_LOCATION "${FFmpeg_FFMPEG_EXECUTABLE}")
335319
endif()
336320

337321
if(FFmpeg_FFPROBE_EXECUTABLE AND NOT TARGET FFmpeg::ffprobeexe)
338322
add_executable(FFmpeg::ffprobeexe IMPORTED)
339-
set_target_properties(FFmpeg::ffprobeexe
340-
PROPERTIES
341-
IMPORTED_LOCATION "${FFmpeg_FFPROBE_EXECUTABLE}"
342-
)
323+
set_target_properties(FFmpeg::ffprobeexe PROPERTIES IMPORTED_LOCATION "${FFmpeg_FFPROBE_EXECUTABLE}")
343324
endif()
344325

345326
mark_as_advanced(FFmpeg_FFMPEG_EXECUTABLE FFmpeg_FFPROBE_EXECUTABLE)

cmake/macos/buildspec.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ function(_check_dependencies_macos)
2424
set(webrtc_filename "webrtc-VERSION-osx-ARCH.zip")
2525
set(webrtc_destination "webrtc-VERSION-osx-ARCH")
2626

27-
set(dependencies_list prebuilt qt6 cef libmediasoupclient webrtc)
27+
set(
28+
dependencies_list
29+
prebuilt
30+
qt6
31+
cef
32+
libmediasoupclient
33+
webrtc
34+
)
2835

2936
_check_dependencies()
3037

0 commit comments

Comments
 (0)