mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 10:37:10 +01:00
Fix osgearth rocksdb plugin build falied
This commit is contained in:
parent
e6a21e1b42
commit
4b81f7f08f
@ -1,4 +1,4 @@
|
|||||||
Source: osgearth
|
Source: osgearth
|
||||||
Version: 2.10.1
|
Version: 2.10.2
|
||||||
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
|
Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping.
|
||||||
Build-Depends: osg
|
Build-Depends: osg
|
||||||
|
84
ports/osgearth/RocksDB.patch
Normal file
84
ports/osgearth/RocksDB.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
diff --git a/CMakeModules/FindRocksDB.cmake b/CMakeModules/FindRocksDB.cmake
|
||||||
|
index 109b383..8382ed9 100644
|
||||||
|
--- a/CMakeModules/FindRocksDB.cmake
|
||||||
|
+++ b/CMakeModules/FindRocksDB.cmake
|
||||||
|
@@ -40,5 +40,49 @@ find_package_handle_standard_args(ROCKSDB
|
||||||
|
"Could NOT find ROCKSDB"
|
||||||
|
)
|
||||||
|
|
||||||
|
+if(ROCKSDB_FOUND)
|
||||||
|
+ FIND_PACKAGE(ZLIB REQUIRED)
|
||||||
|
+
|
||||||
|
+ include(SelectLibraryConfigurations)
|
||||||
|
+ # Find Snappy library
|
||||||
|
+ find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd)
|
||||||
|
+ find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy)
|
||||||
|
+ select_library_configurations(SNAPPY)
|
||||||
|
+ find_package_handle_standard_args(SNAPPY
|
||||||
|
+ FOUND_VAR
|
||||||
|
+ SNAPPY_FOUND
|
||||||
|
+ REQUIRED_VARS
|
||||||
|
+ SNAPPY_LIBRARY
|
||||||
|
+ FAIL_MESSAGE
|
||||||
|
+ "Could NOT find SNAPPY"
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
+ # Find LZ4 library
|
||||||
|
+ find_library(LZ4_LIBRARY_DEBUG NAMES lz4d)
|
||||||
|
+ find_library(LZ4_LIBRARY_RELEASE NAMES lz4)
|
||||||
|
+ select_library_configurations(LZ4)
|
||||||
|
+ find_package_handle_standard_args(LZ4
|
||||||
|
+ FOUND_VAR
|
||||||
|
+ LZ4_FOUND
|
||||||
|
+ REQUIRED_VARS
|
||||||
|
+ LZ4_LIBRARY
|
||||||
|
+ FAIL_MESSAGE
|
||||||
|
+ "Could NOT find LZ4"
|
||||||
|
+ )
|
||||||
|
+
|
||||||
|
+ # Find ZSTD library
|
||||||
|
+ find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd)
|
||||||
|
+ find_library(ZSTD_LIBRARY_RELEASE NAMES zstd)
|
||||||
|
+ select_library_configurations(ZSTD)
|
||||||
|
+ find_package_handle_standard_args(ZSTD
|
||||||
|
+ FOUND_VAR
|
||||||
|
+ ZSTD_FOUND
|
||||||
|
+ REQUIRED_VARS
|
||||||
|
+ ZSTD_LIBRARY
|
||||||
|
+ FAIL_MESSAGE
|
||||||
|
+ "Could NOT find ZSTD_"
|
||||||
|
+ )
|
||||||
|
+endif(ROCKSDB_FOUND)
|
||||||
|
+
|
||||||
|
set(ROCKSDB_INCLUDE_DIRS ${ROCKSDB_INCLUDE_DIR} )
|
||||||
|
set(ROCKSDB_LIBRARIES ${ROCKSDB_LIBRARY})
|
||||||
|
-
|
||||||
|
-
|
||||||
|
|
||||||
|
diff --git a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt
|
||||||
|
index 68ad85d..86bb18a 100644
|
||||||
|
--- a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt
|
||||||
|
+++ b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt
|
||||||
|
@@ -16,7 +16,19 @@ SET(TARGET_SRC
|
||||||
|
RocksDBCacheDriver.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
-SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY)
|
||||||
|
+if(SNAPPY_FOUND)
|
||||||
|
+ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${SNAPPY_LIBRARY})
|
||||||
|
+endif(SNAPPY_FOUND)
|
||||||
|
+
|
||||||
|
+if(LZ4_FOUND)
|
||||||
|
+ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${LZ4_LIBRARY})
|
||||||
|
+endif(LZ4_FOUND)
|
||||||
|
+
|
||||||
|
+if(ZSTD_FOUND)
|
||||||
|
+ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${ZSTD_LIBRARY})
|
||||||
|
+endif(ZSTD_FOUND)
|
||||||
|
+
|
||||||
|
+SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY ROCKSDB_DEPENDENT_LIBRARY)
|
||||||
|
|
||||||
|
IF(MSVC)
|
||||||
|
SET(TARGET_EXTERNAL_LIBRARIES ws2_32 winmm rpcrt4 shlwapi)
|
||||||
|
-
|
||||||
|
-
|
@ -9,20 +9,14 @@ if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1)
|
|||||||
endif()
|
endif()
|
||||||
string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}")
|
string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}")
|
||||||
|
|
||||||
vcpkg_download_distfile(
|
|
||||||
VS2017PATCH
|
|
||||||
URLS "https://github.com/remoe/osgearth/commit/f7081cc4f9991c955c6a0ef7b7b50e48360d14fd.diff"
|
|
||||||
FILENAME "osgearth-f7081cc4f9991c955c6a0ef7b7b50e48360d14fd.patch"
|
|
||||||
SHA512 eadb47a5713c00c05add8627e5cad22844db041da34081d59104151a1a1e2d5ac9552909d67171bfc0449a3e4d2930dd3a7914d3ec7ef7ff1015574e9c9a6105
|
|
||||||
)
|
|
||||||
|
|
||||||
vcpkg_from_github(
|
vcpkg_from_github(
|
||||||
OUT_SOURCE_PATH SOURCE_PATH
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
REPO gwaldron/osgearth
|
REPO gwaldron/osgearth
|
||||||
REF osgearth-2.10.1
|
REF osgearth-2.10.2
|
||||||
SHA512 a74e6922ae29f85b4227b23a83dbccba92e08b7880533c281ceb244703c38b51a02823fdee3199c975c969db963b35ebad0e3bfed3c1e218a36d130b20a48e5b
|
SHA512 fa306a82374716dafae9d834ed0fb07a7369ae0961696de36b6e2af45bc150040295985d9b9781ab713fd0707691451a6a8f173b34253749ab22764f51e60045
|
||||||
HEAD_REF master
|
HEAD_REF master
|
||||||
PATCHES ${VS2017PATCH}
|
PATCHES
|
||||||
|
RocksDB.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user