aports/testing/lomiri-location-service/0003-cmake-install-libraries.patch

142 lines
5.6 KiB
Diff

From 084506eb7ad1256b7febd9afc64b015e12683947 Mon Sep 17 00:00:00 2001
From: Aster Boese <asterboese@mailbox.org>
Date: Sat, 25 Jan 2025 20:43:39 -0500
Subject: [PATCH 3/3] cmake: install libraries
---
.../com/lomiri/location/CMakeLists.txt | 10 ++++++++++
.../com/lomiri/location/providers/dummy/CMakeLists.txt | 5 +++++
.../lomiri/location/providers/geoclue/CMakeLists.txt | 5 +++++
.../com/lomiri/location/providers/gps/CMakeLists.txt | 5 +++++
.../com/lomiri/location/providers/gpsd/CMakeLists.txt | 7 ++++++-
.../lomiri/location/providers/remote/CMakeLists.txt | 5 +++++
.../lomiri/location/providers/skyhook/CMakeLists.txt | 5 +++++
tests/CMakeLists.txt | 5 +++++
8 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/src/location_service/com/lomiri/location/CMakeLists.txt b/src/location_service/com/lomiri/location/CMakeLists.txt
index e215efd..cd80de9 100644
--- a/src/location_service/com/lomiri/location/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/CMakeLists.txt
@@ -233,6 +233,16 @@ target_link_libraries(
${GFlags_LIBRARY}
)
+install(
+ TARGETS lomiri-location-service-provider-daemon
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+install(
+ TARGETS lomiri-location-service-daemon
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
install(
TARGETS lomiri-location-service-providerd
DESTINATION ${CMAKE_INSTALL_BINDIR}
diff --git a/src/location_service/com/lomiri/location/providers/dummy/CMakeLists.txt b/src/location_service/com/lomiri/location/providers/dummy/CMakeLists.txt
index 91187a9..45b6f9a 100644
--- a/src/location_service/com/lomiri/location/providers/dummy/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/providers/dummy/CMakeLists.txt
@@ -10,3 +10,8 @@ set(
ENABLED_PROVIDER_TARGETS
${ENABLED_PROVIDER_TARGETS} dummy
PARENT_SCOPE)
+
+install(
+ TARGETS dummy
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
diff --git a/src/location_service/com/lomiri/location/providers/geoclue/CMakeLists.txt b/src/location_service/com/lomiri/location/providers/geoclue/CMakeLists.txt
index 737f479..e994bee 100644
--- a/src/location_service/com/lomiri/location/providers/geoclue/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/providers/geoclue/CMakeLists.txt
@@ -21,4 +21,9 @@ if (LOCATION_SERVICE_ENABLE_GEOCLUE_PROVIDER)
-DCOM_LOMIRI_LOCATION_SERVICE_PROVIDERS_GEOCLUE ${ENABLED_PROVIDER_TARGETS_DEFINITIONS}
PARENT_SCOPE
)
+
+ install(
+ TARGETS geoclue
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
endif (LOCATION_SERVICE_ENABLE_GEOCLUE_PROVIDER)
diff --git a/src/location_service/com/lomiri/location/providers/gps/CMakeLists.txt b/src/location_service/com/lomiri/location/providers/gps/CMakeLists.txt
index e6a1402..f604e8e 100644
--- a/src/location_service/com/lomiri/location/providers/gps/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/providers/gps/CMakeLists.txt
@@ -44,5 +44,10 @@ if ((LOCATION_SERVICE_ENABLE_GPS_PROVIDER) AND (UBUNTU_PLATFORM_HARDWARE_API_FOU
PARENT_SCOPE
)
+ install(
+ TARGETS gps
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
install(FILES gps.conf DESTINATION /etc/)
endif ()
diff --git a/src/location_service/com/lomiri/location/providers/gpsd/CMakeLists.txt b/src/location_service/com/lomiri/location/providers/gpsd/CMakeLists.txt
index 73d6a7c..87524ee 100644
--- a/src/location_service/com/lomiri/location/providers/gpsd/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/providers/gpsd/CMakeLists.txt
@@ -23,4 +23,9 @@ if (LOCATION_SERVICE_ENABLE_GPSD_PROVIDER)
-DCOM_LOMIRI_LOCATION_SERVICE_PROVIDERS_GPSD ${ENABLED_PROVIDER_TARGETS_DEFINITIONS}
PARENT_SCOPE
)
-endif(LOCATION_SERVICE_ENABLE_GPSD_PROVIDER)
\ No newline at end of file
+
+ install(
+ TARGETS gpsd
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+endif(LOCATION_SERVICE_ENABLE_GPSD_PROVIDER)
diff --git a/src/location_service/com/lomiri/location/providers/remote/CMakeLists.txt b/src/location_service/com/lomiri/location/providers/remote/CMakeLists.txt
index e526f42..bac4359 100644
--- a/src/location_service/com/lomiri/location/providers/remote/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/providers/remote/CMakeLists.txt
@@ -3,3 +3,8 @@ add_library(
provider.h provider.cpp
stub.cpp skeleton.cpp
)
+
+install(
+ TARGETS remote
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
diff --git a/src/location_service/com/lomiri/location/providers/skyhook/CMakeLists.txt b/src/location_service/com/lomiri/location/providers/skyhook/CMakeLists.txt
index 0d9013c..33cce9d 100644
--- a/src/location_service/com/lomiri/location/providers/skyhook/CMakeLists.txt
+++ b/src/location_service/com/lomiri/location/providers/skyhook/CMakeLists.txt
@@ -36,5 +36,10 @@ if (LOCATION_SERVICE_ENABLE_SKYHOOK_PROVIDER)
-DCOM_LOMIRI_LOCATION_SERVICE_PROVIDERS_SKYHOOK ${ENABLED_PROVIDER_TARGETS_DEFINITIONS}
PARENT_SCOPE
)
+
+ install(
+ TARGETS skyhook
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
endif (WPSAPI_FOUND)
endif (LOCATION_SERVICE_ENABLE_SKYHOOK_PROVIDER)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 8342fca..20b3298 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -48,6 +48,11 @@ macro(LOCATION_SERVICE_ADD_TEST test_name src)
${GMOCK_LIBRARIES}
${GTEST_BOTH_LIBRARIES})
+ install(
+ TARGETS mongoose
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
add_test(${test_name} ${CMAKE_CURRENT_BINARY_DIR}/${test_name} --gtest_filter=*-*requires*)
# Address android's limit on cmdline length and distill lomiri-location-service into lls
--
2.48.1