Fix CMake check for SFC_SET_COMPRESSION_LEVEL (#6054)

This commit is contained in:
Hussam al-Homsi
2021-07-26 22:10:01 -04:00
committed by GitHub
parent 5d7692f437
commit 3a39008d0c

View File

@@ -194,10 +194,13 @@ FIND_PACKAGE(SndFile REQUIRED)
IF(NOT SNDFILE_FOUND)
MESSAGE(FATAL_ERROR "LMMS requires libsndfile1 and libsndfile1-dev >= 1.0.18 - please install, remove CMakeCache.txt and try again!")
ENDIF()
# check if we can use SF_SET_COMPRESSION_LEVEL
IF(NOT SNDFILE_VERSION VERSION_LESS 1.0.26)
SET(LMMS_HAVE_SF_COMPLEVEL TRUE)
ENDIF()
# check if we can use SFC_SET_COMPRESSION_LEVEL
INCLUDE(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES(
"#include <sndfile.h>
int main() {SFC_SET_COMPRESSION_LEVEL;}"
LMMS_HAVE_SF_COMPLEVEL
)
IF(WANT_LV2)
IF(PKG_CONFIG_FOUND)