From 7b78d2e05877c5542f274b39ee24bf6815091e21 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 6 Apr 2022 00:14:43 +0200 Subject: [PATCH] Fix linking of GPSTk --- src/tests/data/gpstk_static.patch | 17 +++++++++++++---- src/utils/rinex-tools/CMakeLists.txt | 2 +- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/tests/data/gpstk_static.patch b/src/tests/data/gpstk_static.patch index c8ed6de56..7acf49dbf 100644 --- a/src/tests/data/gpstk_static.patch +++ b/src/tests/data/gpstk_static.patch @@ -1,10 +1,10 @@ SPDX-License-Identifier: GPL-3.0-or-later SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades ---- CMakeLists.txt 2020-10-25 10:06:26.000000000 +0100 -+++ CMakeLists.txt 2020-10-25 10:06:11.000000000 +0100 +--- CMakeLists.txt 2022-04-05 23:24:04.000000000 +0200 ++++ CMakeLists.txt 2022-04-05 23:29:02.000000000 +0200 @@ -77,7 +77,16 @@ - - + + include( BuildSetup.cmake ) - +set(STADYN "STATIC") @@ -20,3 +20,12 @@ SPDX-FileCopyrightText: 2020 Carles Fernandez-Prades #============================================================ # Core Library Target Files #============================================================ +@@ -160,7 +169,7 @@ + add_library( gpstk ${STADYN} ${GPSTK_SRC_FILES} ${GPSTK_INC_FILES} ) + + # GPSTk library install target +-install( TARGETS gpstk DESTINATION "${CMAKE_INSTALL_LIBDIR}" EXPORT "${EXPORT_TARGETS_FILENAME}" ) ++install( TARGETS gpstk DESTINATION lib EXPORT "${EXPORT_TARGETS_FILENAME}" ) + + # GPSTk header file install target (whether it is version dependent changes based on user flag) + install( FILES ${GPSTK_INC_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) diff --git a/src/utils/rinex-tools/CMakeLists.txt b/src/utils/rinex-tools/CMakeLists.txt index cedb4df70..e51c7dddb 100644 --- a/src/utils/rinex-tools/CMakeLists.txt +++ b/src/utils/rinex-tools/CMakeLists.txt @@ -10,7 +10,7 @@ if("${ARMADILLO_VERSION_STRING}" VERSION_GREATER "9.800" OR (NOT ARMADILLO_FOUND find_package(GPSTK QUIET) if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK) include(GNUInstallDirs) - set(GPSTK_LIBRARY ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/${CMAKE_INSTALL_LIBDIR}/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(GPSTK_LIBRARY ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/lib/${CMAKE_FIND_LIBRARY_PREFIXES}gpstk${CMAKE_STATIC_LIBRARY_SUFFIX}) set(GPSTK_INCLUDE_DIR ${CMAKE_BINARY_DIR}/gpstk-${GNSSSDR_GPSTK_LOCAL_VERSION}/install/include) endif()