From fed2035f1e3b86e06339101e2b18cd7235113d51 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 19 Jun 2019 11:59:41 +0200 Subject: [PATCH] Fixes in version reporting --- CMakeLists.txt | 13 +++++++++---- cmake/Modules/FindGFLAGS.cmake | 1 + cmake/Modules/FindGNURADIO.cmake | 1 + cmake/Modules/FindUHD.cmake | 1 + cmake/Modules/FindVOLK.cmake | 1 + 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ea8e75e7..8df892d8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -890,15 +890,20 @@ if(NOT VOLKGNSSSDR_FOUND) message(FATAL_ERROR "six - python 2 and 3 compatibility library required to build VOLK_GNSSSDR") endif() + set_package_properties(Python3 PROPERTIES + URL "https://www.python.org/" + PURPOSE "Required to build volk_gnsssdr." + TYPE REQUIRED + ) if(Python3_FOUND) set_package_properties(Python3 PROPERTIES - URL "https://www.python.org/" DESCRIPTION "An interpreted, high-level, general-purpose programming language (found: ${Python3_VERSION})" - PURPOSE "Required to build volk_gnsssdr." - TYPE REQUIRED + ) + else() + set_package_properties(Python3 PROPERTIES + DESCRIPTION "An interpreted, high-level, general-purpose programming language" ) endif() - if(Python2_FOUND) set_package_properties(Python2 PROPERTIES URL "https://www.python.org/" diff --git a/cmake/Modules/FindGFLAGS.cmake b/cmake/Modules/FindGFLAGS.cmake index 5de8d4247..ffa302bfe 100644 --- a/cmake/Modules/FindGFLAGS.cmake +++ b/cmake/Modules/FindGFLAGS.cmake @@ -120,6 +120,7 @@ if(GFLAGS_FOUND) if(PACKAGE_VERSION) set(GFLAGS_VERSION ${PACKAGE_VERSION}) endif() + unset(PACKAGE_VERSION) endif() if(GFLAGS_FOUND AND NOT TARGET Gflags::gflags) diff --git a/cmake/Modules/FindGNURADIO.cmake b/cmake/Modules/FindGNURADIO.cmake index 27777983c..39bc0fcd2 100644 --- a/cmake/Modules/FindGNURADIO.cmake +++ b/cmake/Modules/FindGNURADIO.cmake @@ -193,6 +193,7 @@ if(NOT PC_GNURADIO_RUNTIME_VERSION) if(PACKAGE_VERSION) set(PC_GNURADIO_RUNTIME_VERSION ${PACKAGE_VERSION}) endif() + unset(PACKAGE_VERSION) endif() # Trick to find out that GNU Radio is >= 3.7.4 if pkgconfig is not present diff --git a/cmake/Modules/FindUHD.cmake b/cmake/Modules/FindUHD.cmake index 6b9c09b5a..286a1cacb 100644 --- a/cmake/Modules/FindUHD.cmake +++ b/cmake/Modules/FindUHD.cmake @@ -89,6 +89,7 @@ if(NOT PC_UHD_VERSION) if(PACKAGE_VERSION) set(UHD_VERSION ${PACKAGE_VERSION}) endif() + unset(PACKAGE_VERSION) endif() if(UHD_FOUND AND NOT TARGET Uhd::uhd) diff --git a/cmake/Modules/FindVOLK.cmake b/cmake/Modules/FindVOLK.cmake index 7f5497364..e788e509c 100644 --- a/cmake/Modules/FindVOLK.cmake +++ b/cmake/Modules/FindVOLK.cmake @@ -92,6 +92,7 @@ if(NOT VOLK_VERSION) if(PACKAGE_VERSION) set(VOLK_VERSION ${PACKAGE_VERSION}) endif() + unset(PACKAGE_VERSION) endif() mark_as_advanced(VOLK_LIBRARIES VOLK_INCLUDE_DIRS VOLK_VERSION)