Skip to contentSkip to conversation

rocksdb: make resulting cmake config relocatable

PATCH New Pascal Bach 1 participant 1 message Jan 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rocksdb: make resulting cmake config relocatable

RocksDB is still using CMake 2.8 and thus does not make use of importet targets. This leads to hardcoded paths to the build directory in the resulting packaged files.

The workaround for the issue is to bypass CMakes detection and let the linker deal with finding the right library.

This is necessary until RocksDB moves to a more modern CMake. It's also applied in the Poco recipe right now.

---
 meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-oe/recipes-dbs/rocksdb/rocksdb_git.bb +3 -3
index 67822477e..60afa7147 100644
@@ -18,9 +18,9 @@ S = "${WORKDIR}/git"
 inherit cmake
 
 PACKAGECONFIG ??= "bzip2 zlib lz4"
-PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON,-DWITH_BZ2=OFF,bzip2"
-PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON,-DWITH_LZ4=OFF,lz4"
-PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON,-DWITH_ZLIB=OFF,zlib"
+PACKAGECONFIG[bzip2] = "-DWITH_BZ2=ON -DBZIP2_LIBRARIES:STRING=bz2,-DWITH_BZ2=OFF,bzip2"
+PACKAGECONFIG[lz4] = "-DWITH_LZ4=ON -DLZ4_LIBRARIES:STRING=lz4,-DWITH_LZ4=OFF,lz4"
+PACKAGECONFIG[zlib] = "-DWITH_ZLIB=ON -DZLIB_LIBRARIES:STRING=z,-DWITH_ZLIB=OFF,zlib"
 PACKAGECONFIG[lite] = "-DROCKSDB_LITE=ON,-DROCKSDB_LITE=OFF"
 
 # Tools and tests currently don't compile on armv5 so we disable them
Signature · 1 line
2.11.0