Skip to content

Commit a6fee01

Browse files
authored
Fix CMake 4.0+ whitespace error (#177)
Compiling on my system without this would fail like so: ``` -- Generating done (0.1s) CMake Error at cmake/FindFFmpeg.cmake:245 (add_library): Target "FFmpeg::avcodec" links to item " /usr/lib/libavcodec.so avcodec" which has leading or trailing whitespace. This is now an error according to policy CMP0004. Call Stack (most recent call first): CMakeLists.txt:54 (find_package) ``` Behaviour changed in CMake 4.0 https://cmake.org/cmake/help/latest/policy/CMP0004.html
2 parents 8347408 + e1c2b96 commit a6fee01

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmake/FindFFmpeg.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ if (TRUE)
246246
set_target_properties(FFmpeg::${_lowerComponent} PROPERTIES
247247
INTERFACE_COMPILE_OPTIONS "${${_component}_DEFINITIONS}"
248248
INTERFACE_INCLUDE_DIRECTORIES ${${_component}_INCLUDE_DIRS}
249-
INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY} ${${_component}_LIBRARIES} ${PC_${_component}_LIBRARIES}"
249+
INTERFACE_LINK_LIBRARIES "${${_component}_LIBRARY}" "${${_component}_LIBRARIES}" "${PC_${_component}_LIBRARIES}"
250250
IMPORTED_LINK_INTERFACE_MULTIPLICITY 3)
251251
endif()
252252
else()

0 commit comments

Comments
 (0)