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,11 +938,19 @@ feature_updater(OFF)
# Fulfill Requirements
#- OBS: Library
if(STANDALONE)
find_package(libobs REQUIRED NO_MODULE
PATHS
"${${PREFIX}OBS_PATH}/cmake/libobs"
"${${PREFIX}OBS_PATH}/cmake/LibObs"
)
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
PATHS
"${${PREFIX}OBS_PATH}/cmake/libobs"
"${${PREFIX}OBS_PATH}/cmake/LibObs"
)
endif()
endif()
#- OBS: Front-End API