From 5f7e1e21f627a7a4b959b8dcb99126ff488c5d45 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 5 Apr 2022 21:50:43 +0200 Subject: [PATCH] Fix linking of GPSTk --- src/utils/rinex-tools/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/rinex-tools/CMakeLists.txt b/src/utils/rinex-tools/CMakeLists.txt index 3191c6ca4..bc1bce4ca 100644 --- a/src/utils/rinex-tools/CMakeLists.txt +++ b/src/utils/rinex-tools/CMakeLists.txt @@ -58,9 +58,11 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERSION}) add_dependencies(obsdiff matio-${GNSSSDR_MATIO_LOCAL_VERSION}) endif() - file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIR}/gpstk) + if(NOT TARGET Gpstk::gpstk) + file(MAKE_DIRECTORY ${GPSTK_INCLUDE_DIR}/gpstk) add_library(Gpstk::gpstk STATIC IMPORTED) + add_dependencies(Gpstk::gpstk gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}) set_target_properties(Gpstk::gpstk PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" IMPORTED_LOCATION "${GPSTK_LIBRARY}"