Skip to content

Commit d21b23e

Browse files
EdueskaWeizglikely
authored andcommitted
properties-view: Silence obs_data deprecation warning
OBS 32 marks the obs_data_*_autoselect_* API as OBS_DEPRECATED. The vendored properties-view.cpp still uses these (still-functional) calls, so the plugin template's warnings-as-errors turned C4996 into a build failure. Suppress only the deprecation diagnostic for this interface target instead of removing the calls, keeping behaviour unchanged. Signed-off-by: EdueskaWeiz (GitHub user) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
1 parent 8799eba commit d21b23e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

shared/properties-view/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ target_sources(
4444
)
4545
target_include_directories(properties-view INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
4646

47+
# properties-view.cpp mirrors OBS's own widget and still calls the
48+
# obs_data_*_autoselect_* API, which OBS 32 marks OBS_DEPRECATED. The calls
49+
# remain functional; silence only the deprecation diagnostic so the plugin
50+
# template's warnings-as-errors (/WX, -Werror) does not fail the build.
51+
target_compile_options(
52+
properties-view
53+
INTERFACE
54+
$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/wd4996>
55+
$<$<COMPILE_LANG_AND_ID:CXX,GNU,Clang,AppleClang>:-Wno-deprecated-declarations>
56+
)
57+
4758
target_link_libraries(
4859
properties-view
4960
INTERFACE

0 commit comments

Comments
 (0)