cmake: Add support for older libOBS versions

This is necessary for libOBS 27.2 and earlier, as the file name is LibObsConfig.cmake, not libobsConfig.cmake.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2022-06-02 07:59:00 +02:00
parent 9fbbcdf89d
commit a5b20c85b0

View file

@ -938,12 +938,20 @@ feature_updater(OFF)
# Fulfill Requirements # Fulfill Requirements
#- OBS: Library #- OBS: Library
if(STANDALONE) if(STANDALONE)
if(EXISTS "${${PREFIX}OBS_PATH}/cmake/LibObs/LibObsConfig.cmake")
find_package(LibObs REQUIRED NO_MODULE
PATHS
"${${PREFIX}OBS_PATH}/cmake/libobs"
"${${PREFIX}OBS_PATH}/cmake/LibObs"
)
else()
find_package(libobs REQUIRED NO_MODULE find_package(libobs REQUIRED NO_MODULE
PATHS PATHS
"${${PREFIX}OBS_PATH}/cmake/libobs" "${${PREFIX}OBS_PATH}/cmake/libobs"
"${${PREFIX}OBS_PATH}/cmake/LibObs" "${${PREFIX}OBS_PATH}/cmake/LibObs"
) )
endif() endif()
endif()
#- OBS: Front-End API #- OBS: Front-End API
set(HAVE_OBS_FRONTEND_API OFF) set(HAVE_OBS_FRONTEND_API OFF)