]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] CMake: show version of packages found if available
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 8 Aug 2024 08:52:29 +0000 (09:52 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 8 Aug 2024 08:52:29 +0000 (09:52 +0100)
cmake/ProcessPackage.cmake

index a46fd85b43ad13d22d750a350b75373a87c74d7a..316662568bb00b6a465b9b6f24a94242abac5826 100644 (file)
@@ -32,7 +32,12 @@ MACRO(ProcessPackage PKG_NAME)
     ENDIF()
 
     IF(${PKG_NAME}_FOUND)
-        MESSAGE(STATUS "Found package ${PKG_NAME} in pkg-config modules ${PKG_MODULES}")
+        SET(_ver ${${PKG_NAME}_VERSION})
+        IF(_ver)
+            MESSAGE(STATUS "Found package ${PKG_NAME} (${_ver}) in pkg-config modules ${PKG_MODULES}")
+        ELSE()
+            MESSAGE(STATUS "Found package ${PKG_NAME} in pkg-config modules ${PKG_MODULES}")
+        ENDIF()
         SET(WITH_${PKG_NAME} 1 CACHE INTERNAL "")
         IF(ENABLE_STATIC MATCHES "ON")
             SET(_XPREFIX "${PKG_NAME}_STATIC")