Skip to contentSkip to conversation

proj: add a packageconfig to build as a static library

PATCH New Clément Péron 1 participant 2 messages Dec 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 proj: add a packageconfig to build as a static library

Add a packageconfig to build Proj as a static library.

Keep the library shared by default.

---
 meta-oe/recipes-navigation/proj/proj_9.1.0.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-oe/recipes-navigation/proj/proj_9.1.0.bb +2 -1
index ab69f0776..818c87bf0 100644
@@ -16,9 +16,10 @@ FILES:${PN} += "${datadir}/proj"
 
 BBCLASSEXTEND = "native"
 
-PACKAGECONFIG ?= "curl"
+PACKAGECONFIG ?= "curl shared"
 PACKAGECONFIG:append:class-native = " apps"
 
 PACKAGECONFIG[apps] = "-DBUILD_APPS=ON, -DBUILD_APPS=OFF"
 PACKAGECONFIG[curl] = "-DENABLE_CURL=ON,-DENABLE_CURL=OFF,curl"
+PACKAGECONFIG[shared] = "-DBUILD_SHARED_LIBS=ON,-DBUILD_SHARED_LIBS=OFF,,"
 PACKAGECONFIG[tiff] = "-DENABLE_TIFF=ON,-DENABLE_TIFF=OFF,tiff"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 proj: avoid leaking host path in libproj

When compiling libproj for a SDK, the proj-targets.cmake generated contains the host path in the INTERFACE_LINK_LIBRARIES.

This path comes from the sqlite3 libraries that gives the full path to the sqlite3 library at build time.

Force the libproj to link with "sqlite3" instead of a full path.

---
 meta-oe/recipes-navigation/proj/proj_9.1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-navigation/proj/proj_9.1.0.bb +1 -1
index 818c87bf0..218f08396 100644
@@ -10,7 +10,7 @@ SRC_URI[sha256sum] = "81b2239b94cad0886222cde4f53cb49d34905aad2a1317244a0c30a553
 
 inherit cmake lib_package
 
-EXTRA_OECMAKE = "-DBUILD_TESTING=OFF"
+EXTRA_OECMAKE = "-DBUILD_TESTING=OFF -DSQLITE3_LIBRARY:STRING=sqlite3"
 
 FILES:${PN} += "${datadir}/proj"
 
Signature · 1 line
2.34.1