Fix build without optional dependencies

This commit is contained in:
Přemysl Eric Janouch 2023-06-09 17:44:20 +02:00
parent f05be01fba
commit 13cf0da8c4
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 5 additions and 4 deletions

View File

@ -28,7 +28,7 @@ include (AddThreads)
find_package (Termo QUIET NO_MODULE) find_package (Termo QUIET NO_MODULE)
add_option (USE_SYSTEM_TERMO add_option (USE_SYSTEM_TERMO
"Don't compile our own termo library, use the system one" ${Termo_FOUND}) "Don't compile our own termo library, use the system one" "${Termo_FOUND}")
if (USE_SYSTEM_TERMO) if (USE_SYSTEM_TERMO)
if (NOT Termo_FOUND) if (NOT Termo_FOUND)
message (FATAL_ERROR "System termo library not found") message (FATAL_ERROR "System termo library not found")
@ -49,7 +49,8 @@ else ()
endif () endif ()
pkg_check_modules (fftw fftw3 fftw3f) pkg_check_modules (fftw fftw3 fftw3f)
add_option (WITH_FFTW "Use FFTW to enable spectrum visualisation" ${fftw_FOUND}) add_option (WITH_FFTW
"Use FFTW to enable spectrum visualisation" "${fftw_FOUND}")
if (WITH_FFTW) if (WITH_FFTW)
if (NOT fftw_FOUND) if (NOT fftw_FOUND)
message (FATAL_ERROR "FFTW not found") message (FATAL_ERROR "FFTW not found")
@ -59,7 +60,7 @@ endif ()
pkg_check_modules (libpulse libpulse) pkg_check_modules (libpulse libpulse)
add_option (WITH_PULSE add_option (WITH_PULSE
"Enable PulseAudio sink volume control" ${libpulse_FOUND}) "Enable PulseAudio sink volume control" "${libpulse_FOUND}")
if (WITH_PULSE) if (WITH_PULSE)
if (NOT libpulse_FOUND) if (NOT libpulse_FOUND)
message (FATAL_ERROR "libpulse not found") message (FATAL_ERROR "libpulse not found")
@ -68,7 +69,7 @@ if (WITH_PULSE)
endif () endif ()
pkg_check_modules (x11 x11 xrender xft fontconfig) pkg_check_modules (x11 x11 xrender xft fontconfig)
add_option (WITH_X11 "Use FFTW to enable spectrum visualisation" ${x11_FOUND}) add_option (WITH_X11 "Use FFTW to enable spectrum visualisation" "${x11_FOUND}")
if (WITH_X11) if (WITH_X11)
if (NOT x11_FOUND) if (NOT x11_FOUND)
message (FATAL_ERROR "Some X11 libraries were not found") message (FATAL_ERROR "Some X11 libraries were not found")