summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindUpower.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindUpower.cmake')
-rw-r--r--cmake/modules/FindUpower.cmake9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmake/modules/FindUpower.cmake b/cmake/modules/FindUpower.cmake
index 95598f19b7..ed8a49187c 100644
--- a/cmake/modules/FindUpower.cmake
+++ b/cmake/modules/FindUpower.cmake
@@ -62,12 +62,15 @@ find_library(Upower_LIBRARY
)
mark_as_advanced(Upower_LIBRARY)
+if(DEFINED PC_Upower_VERSION AND NOT PC_Upower_VERSION STREQUAL "")
+ set(Upower_VERSION "${PC_Upower_VERSION}")
+endif()
+
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
Upower
- DEFAULT_MSG
- Upower_LIBRARY
- Upower_INCLUDE_DIR
+ REQUIRED_VARS Upower_LIBRARY Upower_INCLUDE_DIR
+ VERSION_VAR Upower_VERSION
)
if(Upower_FOUND)