mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Fix coeurl lookup
This commit is contained in:
parent
13d219e8bb
commit
1f17875721
1 changed files with 10 additions and 8 deletions
|
@ -191,20 +191,22 @@ if(USE_BUNDLED_COEURL)
|
||||||
FetchContent_MakeAvailable(coeurl)
|
FetchContent_MakeAvailable(coeurl)
|
||||||
set(COEURL_TARGET_NAME coeurl::coeurl)
|
set(COEURL_TARGET_NAME coeurl::coeurl)
|
||||||
else()
|
else()
|
||||||
# FindPkgConfig sets this as a cache variable, which breaks find_package
|
find_package(PkgConfig)
|
||||||
if(DEFINED coeurl_FOUND)
|
pkg_check_modules(coeurl IMPORTED_TARGET coeurl>=0.1.1)
|
||||||
unset(coeurl_FOUND CACHE)
|
if (TARGET PkgConfig::coeurl)
|
||||||
|
set(COEURL_TARGET_NAME PkgConfig::coeurl)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT TARGET PkgConfig::coeurl)
|
||||||
find_package(coeurl 0.1.1 CONFIG)
|
find_package(coeurl 0.1.1 CONFIG)
|
||||||
if (coeurl_FOUND)
|
if (TARGET coeurl::coeurl)
|
||||||
set(COEURL_TARGET_NAME coeurl::coeurl)
|
set(COEURL_TARGET_NAME coeurl::coeurl)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT COEURL_TARGET_NAME)
|
if (NOT COEURL_TARGET_NAME)
|
||||||
find_package(PkgConfig REQUIRED)
|
message(ERROR "Couldn't find coeurl")
|
||||||
pkg_check_modules(coeurl REQUIRED IMPORTED_TARGET coeurl>=0.1.1)
|
|
||||||
set(COEURL_TARGET_NAME PkgConfig::coeurl)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue