ngompa / rpms / cmake

Forked from rpms/cmake 4 years ago
Clone
bc5d70
commit 889033b5c6847cf1f7bd789384405d59dc333bf6
bc5d70
Author: Raphael Kubo da Costa <rakuco@FreeBSD.org>
bc5d70
Date:   Sat Jun 23 20:30:07 2018 +0200
bc5d70
bc5d70
    FindLibUV: Also check uv/version.h for version detection
bc5d70
    
bc5d70
    Starting with libuv 1.21.0, libuv's headers were moved into a uv/ directory.
bc5d70
    Make FindLibUV aware of the file's new location for configuration to work.
bc5d70
bc5d70
diff --git a/Source/Modules/FindLibUV.cmake b/Source/Modules/FindLibUV.cmake
bc5d70
index ba13d75f8befe247..0554d62c23b0cf6f 100644
bc5d70
--- a/Source/Modules/FindLibUV.cmake
bc5d70
+++ b/Source/Modules/FindLibUV.cmake
bc5d70
@@ -63,6 +63,8 @@ mark_as_advanced(LibUV_INCLUDE_DIR)
bc5d70
 set(_LibUV_H_REGEX "#[ \t]*define[ \t]+UV_VERSION_(MAJOR|MINOR|PATCH)[ \t]+[0-9]+")
bc5d70
 if(LibUV_INCLUDE_DIR AND EXISTS "${LibUV_INCLUDE_DIR}/uv-version.h")
bc5d70
   file(STRINGS "${LibUV_INCLUDE_DIR}/uv-version.h" _LibUV_H REGEX "${_LibUV_H_REGEX}")
bc5d70
+elseif(LibUV_INCLUDE_DIR AND EXISTS "${LibUV_INCLUDE_DIR}/uv/version.h")
bc5d70
+  file(STRINGS "${LibUV_INCLUDE_DIR}/uv/version.h" _LibUV_H REGEX "${_LibUV_H_REGEX}")
bc5d70
 elseif(LibUV_INCLUDE_DIR AND EXISTS "${LibUV_INCLUDE_DIR}/uv.h")
bc5d70
   file(STRINGS "${LibUV_INCLUDE_DIR}/uv.h" _LibUV_H REGEX "${_LibUV_H_REGEX}")
bc5d70
 else()