浏览代码

cmake: Rename variable in FindPipeWire for clarity

PIPEWIRE_DEFINITIONS contains ready-to-use compile flags. If used with
INTERFACE_COMPILE_DEFINITIONS, this can lead to a compile error.

Rename the variable to PIPEWIRE_COMPILE_FLAGS to be clear about that and
prevent accidental misuse.
Arthus 3 年之前
父节点
当前提交
b94e960d25
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      cmake/Modules/FindPipeWire.cmake

+ 4 - 4
cmake/Modules/FindPipeWire.cmake

@@ -10,8 +10,8 @@
 # be passed to target_link_libraries() instead of the ``PipeWire::PipeWire``
 # be passed to target_link_libraries() instead of the ``PipeWire::PipeWire``
 # target ``PIPEWIRE_INCLUDE_DIRS`` This should be passed to
 # target ``PIPEWIRE_INCLUDE_DIRS`` This should be passed to
 # target_include_directories() if the target is not used for linking
 # target_include_directories() if the target is not used for linking
-# ``PIPEWIRE_DEFINITIONS`` This should be passed to target_compile_options() if
-# the target is not used for linking
+# ``PIPEWIRE_COMPILE_FLAGS`` This should be passed to target_compile_options()
+# if the target is not used for linking
 #
 #
 # If ``PIPEWIRE_FOUND`` is TRUE, it will also define the following imported
 # If ``PIPEWIRE_FOUND`` is TRUE, it will also define the following imported
 # target:
 # target:
@@ -56,7 +56,7 @@ find_package(PkgConfig QUIET)
 pkg_search_module(PKG_PIPEWIRE QUIET libpipewire-0.3)
 pkg_search_module(PKG_PIPEWIRE QUIET libpipewire-0.3)
 pkg_search_module(PKG_SPA QUIET libspa-0.2)
 pkg_search_module(PKG_SPA QUIET libspa-0.2)
 
 
-set(PIPEWIRE_DEFINITIONS "${PKG_PIPEWIRE_CFLAGS}" "${PKG_SPA_CFLAGS}")
+set(PIPEWIRE_COMPILE_FLAGS "${PKG_PIPEWIRE_CFLAGS}" "${PKG_SPA_CFLAGS}")
 set(PIPEWIRE_VERSION "${PKG_PIPEWIRE_VERSION}")
 set(PIPEWIRE_VERSION "${PKG_PIPEWIRE_VERSION}")
 
 
 find_path(
 find_path(
@@ -86,7 +86,7 @@ if(PIPEWIRE_FOUND AND NOT TARGET PipeWire::PipeWire)
   set_target_properties(
   set_target_properties(
     PipeWire::PipeWire
     PipeWire::PipeWire
     PROPERTIES IMPORTED_LOCATION "${PIPEWIRE_LIBRARIES}"
     PROPERTIES IMPORTED_LOCATION "${PIPEWIRE_LIBRARIES}"
-               INTERFACE_COMPILE_OPTIONS "${PIPEWIRE_DEFINITIONS}"
+               INTERFACE_COMPILE_OPTIONS "${PIPEWIRE_COMPILE_FLAGS}"
                INTERFACE_INCLUDE_DIRECTORIES
                INTERFACE_INCLUDE_DIRECTORIES
                "${PIPEWIRE_INCLUDE_DIRS};${SPA_INCLUDE_DIRS}")
                "${PIPEWIRE_INCLUDE_DIRS};${SPA_INCLUDE_DIRS}")
 endif()
 endif()