Fix rpi standalone build after recent cmake refactors.

This commit is contained in:
casey langen 2022-04-23 15:15:02 -07:00
parent 9025472f33
commit f3a2074a9e
3 changed files with 13 additions and 9 deletions

View File

@ -1,7 +1,7 @@
#cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr . #cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
#cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr . #cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr .
#cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release . #cmake -DGENERATE_DEB=true -DDEB_ARCHITECTURE=i386|amd64|armhf -DDEB_PLATFORM=ubuntu -DDEB_DISTRO=eoan -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
#cmake -DCMAKE_BUILD_TYPE=Release - -DBUILD_STANDALONE=true . #cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STANDALONE=true .
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)

View File

@ -42,9 +42,9 @@ fi
OS_SPECIFIC_BUILD_FLAGS="" OS_SPECIFIC_BUILD_FLAGS=""
if [[ $OS == "Linux" ]]; then if [[ $OS == "Linux" ]]; then
OS_SPECIFIC_BUILD_FLAGS="-DGENERATE_DEB=true -DDEB_ARCHITECTURE=${DEB_ARCH} -DCMAKE_INSTALL_PREFIX=/usr" OS_SPECIFIC_BUILD_FLAGS="-DGENERATE_DEB=true -DDEB_ARCHITECTURE=${DEB_ARCH} -DCMAKE_INSTALL_PREFIX=/usr"
if [[ -z $CROSSCOMPILE ]]; then if [[ $CROSSCOMPILE == "rpi" ]]; then
# for now we don't support pipewire when cross compiling... # for now we don't support pipewire when cross compiling...
OS_SPECIFIC_BUILD_FLAGS="$OS_SPECIFIC_BUILD_FLAGS -DENABLE_PIPEWIRE=true" OS_SPECIFIC_BUILD_FLAGS="$OS_SPECIFIC_BUILD_FLAGS -DENABLE_PIPEWIRE=false"
fi fi
fi fi

View File

@ -3,12 +3,16 @@ set (pipewireout_SOURCES
PipeWireOut.cpp PipeWireOut.cpp
) )
find_package(PkgConfig) if (${ENABLE_PIPEWIRE} MATCHES "false")
pkg_check_modules(PIPEWIRE IMPORTED_TARGET libpipewire-0.3)
if (NOT DEFINED PIPEWIRE_LINK_LIBRARIES)
disable_plugin(pipewireout) disable_plugin(pipewireout)
else() else()
add_library(pipewireout SHARED ${pipewireout_SOURCES}) find_package(PkgConfig)
target_link_libraries(pipewireout PkgConfig::PIPEWIRE) pkg_check_modules(PIPEWIRE IMPORTED_TARGET libpipewire-0.3)
if (NOT DEFINED PIPEWIRE_LINK_LIBRARIES)
disable_plugin(pipewireout)
else()
add_library(pipewireout SHARED ${pipewireout_SOURCES})
target_link_libraries(pipewireout PkgConfig::PIPEWIRE)
endif()
endif() endif()