diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-12-06 15:58:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 15:58:55 +0100 |
commit | 131ed37803d6b42e9f99de36fa35d936bcbd68a3 (patch) | |
tree | fcbe453668952e67ee2b4686ddc15f5348538d0b /externals/find-modules/Findenet.cmake | |
parent | Merge pull request #9391 from abouvier/cmake-sdl (diff) | |
parent | cmake: correct find modules (diff) | |
download | yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.tar yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.tar.gz yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.tar.bz2 yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.tar.lz yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.tar.xz yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.tar.zst yuzu-131ed37803d6b42e9f99de36fa35d936bcbd68a3.zip |
Diffstat (limited to 'externals/find-modules/Findenet.cmake')
-rw-r--r-- | externals/find-modules/Findenet.cmake | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/externals/find-modules/Findenet.cmake b/externals/find-modules/Findenet.cmake index 663a2592f..6dae76f4c 100644 --- a/externals/find-modules/Findenet.cmake +++ b/externals/find-modules/Findenet.cmake @@ -4,10 +4,7 @@ find_package(PkgConfig QUIET) if (PKG_CONFIG_FOUND) - pkg_search_module(ENET QUIET IMPORTED_TARGET GLOBAL libenet) - if (ENET_FOUND) - add_library(enet::enet ALIAS PkgConfig::ENET) - endif() + pkg_search_module(ENET QUIET IMPORTED_TARGET libenet) endif() include(FindPackageHandleStandardArgs) @@ -15,3 +12,7 @@ find_package_handle_standard_args(enet REQUIRED_VARS ENET_LINK_LIBRARIES VERSION_VAR ENET_VERSION ) + +if (enet_FOUND AND NOT TARGET enet::enet) + add_library(enet::enet ALIAS PkgConfig::ENET) +endif() |