2017-11-28 21:13:20 +01:00
|
|
|
cmake_minimum_required(VERSION 3.4)
|
2016-07-18 16:37:49 +02:00
|
|
|
|
2016-01-28 15:44:31 +01:00
|
|
|
set(JNI_NATIVE_SOURCES
|
|
|
|
rocksjni/backupablejni.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/backupenginejni.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/checkpoint.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/clock_cache.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/columnfamilyhandle.cc
|
|
|
|
rocksjni/compaction_filter.cc
|
2018-01-03 21:22:40 +01:00
|
|
|
rocksjni/compaction_filter_factory.cc
|
|
|
|
rocksjni/compaction_filter_factory_jnicallback.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/compaction_options_fifo.cc
|
|
|
|
rocksjni/compaction_options_universal.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/comparator.cc
|
|
|
|
rocksjni/comparatorjnicallback.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/compression_options.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/env.cc
|
2016-09-29 23:04:41 +02:00
|
|
|
rocksjni/env_options.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/filter.cc
|
2017-05-24 20:13:25 +02:00
|
|
|
rocksjni/ingest_external_file_options.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/iterator.cc
|
2018-01-03 21:22:40 +01:00
|
|
|
rocksjni/jnicallback.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/loggerjnicallback.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/lru_cache.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/memtablejni.cc
|
|
|
|
rocksjni/merge_operator.cc
|
2018-03-08 20:16:46 +01:00
|
|
|
rocksjni/native_comparator_wrapper_test.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/options.cc
|
2017-10-13 01:45:01 +02:00
|
|
|
rocksjni/options_util.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/ratelimiterjni.cc
|
|
|
|
rocksjni/remove_emptyvalue_compactionfilterjni.cc
|
2018-01-03 21:22:40 +01:00
|
|
|
rocksjni/rocks_callback_object.cc
|
2017-07-21 23:42:32 +02:00
|
|
|
rocksjni/cassandra_compactionfilterjni.cc
|
2017-08-31 19:10:47 +02:00
|
|
|
rocksjni/cassandra_value_operator.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/restorejni.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/rocksdb_exception_test.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/rocksjni.cc
|
|
|
|
rocksjni/slice.cc
|
|
|
|
rocksjni/snapshot.cc
|
2018-04-07 06:22:37 +02:00
|
|
|
rocksjni/sst_file_manager.cc
|
2016-09-29 23:04:41 +02:00
|
|
|
rocksjni/sst_file_writerjni.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/statistics.cc
|
2017-07-12 08:19:53 +02:00
|
|
|
rocksjni/statisticsjni.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
rocksjni/table.cc
|
|
|
|
rocksjni/transaction_log.cc
|
|
|
|
rocksjni/ttl.cc
|
|
|
|
rocksjni/write_batch.cc
|
|
|
|
rocksjni/write_batch_test.cc
|
2017-04-22 05:41:37 +02:00
|
|
|
rocksjni/write_batch_with_index.cc
|
|
|
|
rocksjni/writebatchhandlerjnicallback.cc
|
2016-01-28 15:44:31 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
set(NATIVE_JAVA_CLASSES
|
|
|
|
org.rocksdb.AbstractCompactionFilter
|
2017-11-28 21:13:20 +01:00
|
|
|
org.rocksdb.AbstractCompactionFilterFactory
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.AbstractImmutableNativeReference
|
|
|
|
org.rocksdb.AbstractNativeReference
|
|
|
|
org.rocksdb.AbstractRocksIterator
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.AbstractSlice
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.AbstractWriteBatch
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.BackupableDBOptions
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.BackupEngine
|
|
|
|
org.rocksdb.BackupEngineTest
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.BlockBasedTableConfig
|
|
|
|
org.rocksdb.BloomFilter
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.Cache
|
2017-07-21 23:42:32 +02:00
|
|
|
org.rocksdb.CassandraCompactionFilter
|
|
|
|
org.rocksdb.CassandraValueMergeOperator
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.Checkpoint
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.ClockCache
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.ColumnFamilyHandle
|
|
|
|
org.rocksdb.ColumnFamilyOptions
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.CompactionOptionsFIFO
|
|
|
|
org.rocksdb.CompactionOptionsUniversal
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.Comparator
|
|
|
|
org.rocksdb.ComparatorOptions
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.CompressionOptions
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.DBOptions
|
|
|
|
org.rocksdb.DirectComparator
|
|
|
|
org.rocksdb.DirectSlice
|
|
|
|
org.rocksdb.Env
|
2016-09-29 23:04:41 +02:00
|
|
|
org.rocksdb.EnvOptions
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.Filter
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.FlushOptions
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.HashLinkedListMemTableConfig
|
|
|
|
org.rocksdb.HashSkipListMemTableConfig
|
2017-08-13 01:26:56 +02:00
|
|
|
org.rocksdb.IngestExternalFileOptions
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.Logger
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.LRUCache
|
|
|
|
org.rocksdb.MemTableConfig
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.MergeOperator
|
2018-03-08 20:16:46 +01:00
|
|
|
org.rocksdb.NativeComparatorWrapper
|
|
|
|
org.rocksdb.NativeComparatorWrapperTest.NativeStringComparatorWrapper
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.NativeLibraryLoader
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.Options
|
2017-10-13 01:45:01 +02:00
|
|
|
org.rocksdb.OptionsUtil
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.PlainTableConfig
|
2016-10-13 00:00:37 +02:00
|
|
|
org.rocksdb.RateLimiter
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.ReadOptions
|
|
|
|
org.rocksdb.RemoveEmptyValueCompactionFilter
|
|
|
|
org.rocksdb.RestoreOptions
|
2017-11-28 21:13:20 +01:00
|
|
|
org.rocksdb.RocksCallbackObject
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.RocksDB
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.RocksDBExceptionTest
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.RocksEnv
|
|
|
|
org.rocksdb.RocksIterator
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.RocksIteratorInterface
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.RocksMemEnv
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.RocksMutableObject
|
|
|
|
org.rocksdb.RocksObject
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.SkipListMemTableConfig
|
|
|
|
org.rocksdb.Slice
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.Snapshot
|
|
|
|
org.rocksdb.SnapshotTest
|
2018-04-07 06:22:37 +02:00
|
|
|
org.rocksdb.SstFileManager
|
2016-09-29 23:04:41 +02:00
|
|
|
org.rocksdb.SstFileWriter
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.Statistics
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.StringAppendOperator
|
|
|
|
org.rocksdb.TableFormatConfig
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.TransactionLogIterator
|
|
|
|
org.rocksdb.TtlDB
|
|
|
|
org.rocksdb.VectorMemTableConfig
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.WBWIRocksIterator
|
2016-01-28 15:44:31 +01:00
|
|
|
org.rocksdb.WriteBatch
|
|
|
|
org.rocksdb.WriteBatch.Handler
|
|
|
|
org.rocksdb.WriteBatchTest
|
|
|
|
org.rocksdb.WriteBatchTestInternalHelper
|
2017-04-22 05:41:37 +02:00
|
|
|
org.rocksdb.WriteBatchWithIndex
|
|
|
|
org.rocksdb.WriteOptions
|
2018-03-03 00:33:08 +01:00
|
|
|
org.rocksdb.util.CapturingWriteBatchHandler
|
|
|
|
org.rocksdb.util.WriteBatchGetter
|
2016-01-28 15:44:31 +01:00
|
|
|
)
|
|
|
|
|
2017-11-28 21:13:20 +01:00
|
|
|
include(FindJava)
|
|
|
|
include(UseJava)
|
|
|
|
include(FindJNI)
|
|
|
|
|
|
|
|
include_directories(${JNI_INCLUDE_DIRS})
|
2016-01-28 15:44:31 +01:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/java)
|
|
|
|
|
|
|
|
set(JAVA_TEST_LIBDIR ${PROJECT_SOURCE_DIR}/java/test-libs)
|
|
|
|
set(JAVA_TMP_JAR ${JAVA_TEST_LIBDIR}/tmp.jar)
|
|
|
|
set(JAVA_JUNIT_JAR ${JAVA_TEST_LIBDIR}/junit-4.12.jar)
|
|
|
|
set(JAVA_HAMCR_JAR ${JAVA_TEST_LIBDIR}/hamcrest-core-1.3.jar)
|
|
|
|
set(JAVA_MOCKITO_JAR ${JAVA_TEST_LIBDIR}/mockito-all-1.10.19.jar)
|
|
|
|
set(JAVA_CGLIB_JAR ${JAVA_TEST_LIBDIR}/cglib-2.2.2.jar)
|
|
|
|
set(JAVA_ASSERTJ_JAR ${JAVA_TEST_LIBDIR}/assertj-core-1.7.1.jar)
|
2017-11-28 21:13:20 +01:00
|
|
|
set(JAVA_TESTCLASSPATH ${JAVA_JUNIT_JAR} ${JAVA_HAMCR_JAR} ${JAVA_MOCKITO_JAR} ${JAVA_CGLIB_JAR} ${JAVA_ASSERTJ_JAR})
|
|
|
|
|
|
|
|
add_jar(
|
|
|
|
rocksdbjni_classes
|
|
|
|
SOURCES
|
|
|
|
src/main/java/org/rocksdb/AbstractCompactionFilter.java
|
|
|
|
src/main/java/org/rocksdb/AbstractCompactionFilterFactory.java
|
|
|
|
src/main/java/org/rocksdb/AbstractComparator.java
|
|
|
|
src/main/java/org/rocksdb/AbstractImmutableNativeReference.java
|
|
|
|
src/main/java/org/rocksdb/AbstractNativeReference.java
|
|
|
|
src/main/java/org/rocksdb/AbstractRocksIterator.java
|
|
|
|
src/main/java/org/rocksdb/AbstractSlice.java
|
|
|
|
src/main/java/org/rocksdb/AbstractWriteBatch.java
|
|
|
|
src/main/java/org/rocksdb/AccessHint.java
|
|
|
|
src/main/java/org/rocksdb/AdvancedColumnFamilyOptionsInterface.java
|
|
|
|
src/main/java/org/rocksdb/AdvancedMutableColumnFamilyOptionsInterface.java
|
|
|
|
src/main/java/org/rocksdb/BackupableDBOptions.java
|
|
|
|
src/main/java/org/rocksdb/BackupEngine.java
|
|
|
|
src/main/java/org/rocksdb/BackupInfo.java
|
|
|
|
src/main/java/org/rocksdb/BlockBasedTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/BloomFilter.java
|
|
|
|
src/main/java/org/rocksdb/BuiltinComparator.java
|
|
|
|
src/main/java/org/rocksdb/Cache.java
|
|
|
|
src/main/java/org/rocksdb/CassandraCompactionFilter.java
|
|
|
|
src/main/java/org/rocksdb/CassandraValueMergeOperator.java
|
|
|
|
src/main/java/org/rocksdb/Checkpoint.java
|
|
|
|
src/main/java/org/rocksdb/ChecksumType.java
|
|
|
|
src/main/java/org/rocksdb/ClockCache.java
|
|
|
|
src/main/java/org/rocksdb/ColumnFamilyDescriptor.java
|
|
|
|
src/main/java/org/rocksdb/ColumnFamilyHandle.java
|
|
|
|
src/main/java/org/rocksdb/ColumnFamilyOptions.java
|
|
|
|
src/main/java/org/rocksdb/ColumnFamilyOptionsInterface.java
|
|
|
|
src/main/java/org/rocksdb/CompactionOptionsFIFO.java
|
|
|
|
src/main/java/org/rocksdb/CompactionOptionsUniversal.java
|
|
|
|
src/main/java/org/rocksdb/CompactionPriority.java
|
|
|
|
src/main/java/org/rocksdb/CompactionStopStyle.java
|
|
|
|
src/main/java/org/rocksdb/CompactionStyle.java
|
|
|
|
src/main/java/org/rocksdb/Comparator.java
|
|
|
|
src/main/java/org/rocksdb/ComparatorOptions.java
|
2018-03-08 20:16:46 +01:00
|
|
|
src/main/java/org/rocksdb/ComparatorType.java
|
2017-11-28 21:13:20 +01:00
|
|
|
src/main/java/org/rocksdb/CompressionOptions.java
|
|
|
|
src/main/java/org/rocksdb/CompressionType.java
|
|
|
|
src/main/java/org/rocksdb/DBOptions.java
|
|
|
|
src/main/java/org/rocksdb/DBOptionsInterface.java
|
|
|
|
src/main/java/org/rocksdb/DbPath.java
|
|
|
|
src/main/java/org/rocksdb/DirectComparator.java
|
|
|
|
src/main/java/org/rocksdb/DirectSlice.java
|
|
|
|
src/main/java/org/rocksdb/EncodingType.java
|
|
|
|
src/main/java/org/rocksdb/Env.java
|
|
|
|
src/main/java/org/rocksdb/EnvOptions.java
|
|
|
|
src/main/java/org/rocksdb/Experimental.java
|
|
|
|
src/main/java/org/rocksdb/Filter.java
|
|
|
|
src/main/java/org/rocksdb/FlushOptions.java
|
|
|
|
src/main/java/org/rocksdb/HashLinkedListMemTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/HashSkipListMemTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/HistogramData.java
|
|
|
|
src/main/java/org/rocksdb/HistogramType.java
|
|
|
|
src/main/java/org/rocksdb/IndexType.java
|
|
|
|
src/main/java/org/rocksdb/InfoLogLevel.java
|
|
|
|
src/main/java/org/rocksdb/IngestExternalFileOptions.java
|
|
|
|
src/main/java/org/rocksdb/Logger.java
|
|
|
|
src/main/java/org/rocksdb/LRUCache.java
|
|
|
|
src/main/java/org/rocksdb/MemTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/MergeOperator.java
|
|
|
|
src/main/java/org/rocksdb/MutableColumnFamilyOptions.java
|
|
|
|
src/main/java/org/rocksdb/MutableColumnFamilyOptionsInterface.java
|
2018-03-08 20:16:46 +01:00
|
|
|
src/main/java/org/rocksdb/NativeComparatorWrapper.java
|
2017-11-28 21:13:20 +01:00
|
|
|
src/main/java/org/rocksdb/NativeLibraryLoader.java
|
|
|
|
src/main/java/org/rocksdb/Options.java
|
|
|
|
src/main/java/org/rocksdb/OptionsUtil.java
|
|
|
|
src/main/java/org/rocksdb/PlainTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/RateLimiter.java
|
2018-01-10 01:27:01 +01:00
|
|
|
src/main/java/org/rocksdb/RateLimiterMode.java
|
2017-11-28 21:13:20 +01:00
|
|
|
src/main/java/org/rocksdb/ReadOptions.java
|
|
|
|
src/main/java/org/rocksdb/ReadTier.java
|
|
|
|
src/main/java/org/rocksdb/RemoveEmptyValueCompactionFilter.java
|
|
|
|
src/main/java/org/rocksdb/RestoreOptions.java
|
|
|
|
src/main/java/org/rocksdb/RocksCallbackObject.java
|
|
|
|
src/main/java/org/rocksdb/RocksDB.java
|
|
|
|
src/main/java/org/rocksdb/RocksDBException.java
|
|
|
|
src/main/java/org/rocksdb/RocksEnv.java
|
|
|
|
src/main/java/org/rocksdb/RocksIterator.java
|
|
|
|
src/main/java/org/rocksdb/RocksIteratorInterface.java
|
|
|
|
src/main/java/org/rocksdb/RocksMemEnv.java
|
|
|
|
src/main/java/org/rocksdb/RocksMutableObject.java
|
|
|
|
src/main/java/org/rocksdb/RocksObject.java
|
|
|
|
src/main/java/org/rocksdb/SkipListMemTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/Slice.java
|
|
|
|
src/main/java/org/rocksdb/Snapshot.java
|
2018-04-07 06:22:37 +02:00
|
|
|
src/main/java/org/rocksdb/SstFileManager.java
|
2017-11-28 21:13:20 +01:00
|
|
|
src/main/java/org/rocksdb/SstFileWriter.java
|
|
|
|
src/main/java/org/rocksdb/Statistics.java
|
|
|
|
src/main/java/org/rocksdb/StatsLevel.java
|
|
|
|
src/main/java/org/rocksdb/Status.java
|
|
|
|
src/main/java/org/rocksdb/StringAppendOperator.java
|
|
|
|
src/main/java/org/rocksdb/TableFormatConfig.java
|
|
|
|
src/main/java/org/rocksdb/TickerType.java
|
|
|
|
src/main/java/org/rocksdb/TransactionLogIterator.java
|
|
|
|
src/main/java/org/rocksdb/TtlDB.java
|
|
|
|
src/main/java/org/rocksdb/util/Environment.java
|
|
|
|
src/main/java/org/rocksdb/VectorMemTableConfig.java
|
|
|
|
src/main/java/org/rocksdb/WALRecoveryMode.java
|
|
|
|
src/main/java/org/rocksdb/WBWIRocksIterator.java
|
|
|
|
src/main/java/org/rocksdb/WriteBatch.java
|
|
|
|
src/main/java/org/rocksdb/WriteBatchInterface.java
|
|
|
|
src/main/java/org/rocksdb/WriteBatchWithIndex.java
|
|
|
|
src/main/java/org/rocksdb/WriteOptions.java
|
|
|
|
src/test/java/org/rocksdb/BackupEngineTest.java
|
|
|
|
src/test/java/org/rocksdb/IngestExternalFileOptionsTest.java
|
2018-03-08 20:16:46 +01:00
|
|
|
src/test/java/org/rocksdb/NativeComparatorWrapperTest.java
|
2017-11-28 21:13:20 +01:00
|
|
|
src/test/java/org/rocksdb/PlatformRandomHelper.java
|
|
|
|
src/test/java/org/rocksdb/RocksDBExceptionTest.java
|
|
|
|
src/test/java/org/rocksdb/RocksMemoryResource.java
|
|
|
|
src/test/java/org/rocksdb/SnapshotTest.java
|
|
|
|
src/test/java/org/rocksdb/WriteBatchTest.java
|
2018-03-03 00:33:08 +01:00
|
|
|
src/test/java/org/rocksdb/util/CapturingWriteBatchHandler.java
|
|
|
|
src/test/java/org/rocksdb/util/WriteBatchGetter.java
|
2017-11-28 21:13:20 +01:00
|
|
|
INCLUDE_JARS ${JAVA_TESTCLASSPATH}
|
|
|
|
)
|
2016-01-28 15:44:31 +01:00
|
|
|
|
|
|
|
if(NOT EXISTS ${PROJECT_SOURCE_DIR}/java/classes)
|
2016-08-18 01:59:22 +02:00
|
|
|
file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/java/classes)
|
2016-01-28 15:44:31 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT EXISTS ${JAVA_TEST_LIBDIR})
|
2016-08-18 01:59:22 +02:00
|
|
|
file(MAKE_DIRECTORY mkdir ${JAVA_TEST_LIBDIR})
|
2016-01-28 15:44:31 +01:00
|
|
|
endif()
|
|
|
|
|
2017-04-22 05:41:37 +02:00
|
|
|
if (DEFINED CUSTOM_REPO_URL)
|
|
|
|
set(SEARCH_REPO_URL ${CUSTOM_REPO_URL}/)
|
|
|
|
set(CENTRAL_REPO_URL ${CUSTOM_REPO_URL}/)
|
|
|
|
else ()
|
|
|
|
set(SEARCH_REPO_URL "http://search.maven.org/remotecontent?filepath=")
|
|
|
|
set(CENTRAL_REPO_URL "http://central.maven.org/maven2/")
|
|
|
|
endif()
|
|
|
|
|
2016-01-28 15:44:31 +01:00
|
|
|
if(NOT EXISTS ${JAVA_JUNIT_JAR})
|
|
|
|
message("Downloading ${JAVA_JUNIT_JAR}")
|
2017-04-22 05:41:37 +02:00
|
|
|
file(DOWNLOAD ${SEARCH_REPO_URL}junit/junit/4.12/junit-4.12.jar ${JAVA_TMP_JAR} STATUS downloadStatus)
|
2016-01-28 15:44:31 +01:00
|
|
|
list(GET downloadStatus 0 error_code)
|
|
|
|
if(NOT error_code EQUAL 0)
|
|
|
|
message(FATAL_ERROR "Failed downloading ${JAVA_JUNIT_JAR}")
|
|
|
|
endif()
|
|
|
|
file(RENAME ${JAVA_TMP_JAR} ${JAVA_JUNIT_JAR})
|
|
|
|
endif()
|
|
|
|
if(NOT EXISTS ${JAVA_HAMCR_JAR})
|
|
|
|
message("Downloading ${JAVA_HAMCR_JAR}")
|
2017-04-22 05:41:37 +02:00
|
|
|
file(DOWNLOAD ${SEARCH_REPO_URL}org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar ${JAVA_TMP_JAR} STATUS downloadStatus)
|
2016-01-28 15:44:31 +01:00
|
|
|
list(GET downloadStatus 0 error_code)
|
|
|
|
if(NOT error_code EQUAL 0)
|
|
|
|
message(FATAL_ERROR "Failed downloading ${JAVA_HAMCR_JAR}")
|
|
|
|
endif()
|
|
|
|
file(RENAME ${JAVA_TMP_JAR} ${JAVA_HAMCR_JAR})
|
|
|
|
endif()
|
|
|
|
if(NOT EXISTS ${JAVA_MOCKITO_JAR})
|
|
|
|
message("Downloading ${JAVA_MOCKITO_JAR}")
|
2017-04-22 05:41:37 +02:00
|
|
|
file(DOWNLOAD ${SEARCH_REPO_URL}org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar ${JAVA_TMP_JAR} STATUS downloadStatus)
|
2016-01-28 15:44:31 +01:00
|
|
|
list(GET downloadStatus 0 error_code)
|
|
|
|
if(NOT error_code EQUAL 0)
|
|
|
|
message(FATAL_ERROR "Failed downloading ${JAVA_MOCKITO_JAR}")
|
|
|
|
endif()
|
|
|
|
file(RENAME ${JAVA_TMP_JAR} ${JAVA_MOCKITO_JAR})
|
|
|
|
endif()
|
|
|
|
if(NOT EXISTS ${JAVA_CGLIB_JAR})
|
|
|
|
message("Downloading ${JAVA_CGLIB_JAR}")
|
2017-04-22 05:41:37 +02:00
|
|
|
file(DOWNLOAD ${SEARCH_REPO_URL}cglib/cglib/2.2.2/cglib-2.2.2.jar ${JAVA_TMP_JAR} STATUS downloadStatus)
|
2016-01-28 15:44:31 +01:00
|
|
|
list(GET downloadStatus 0 error_code)
|
|
|
|
if(NOT error_code EQUAL 0)
|
|
|
|
message(FATAL_ERROR "Failed downloading ${JAVA_CGLIB_JAR}")
|
|
|
|
endif()
|
|
|
|
file(RENAME ${JAVA_TMP_JAR} ${JAVA_CGLIB_JAR})
|
|
|
|
endif()
|
|
|
|
if(NOT EXISTS ${JAVA_ASSERTJ_JAR})
|
|
|
|
message("Downloading ${JAVA_ASSERTJ_JAR}")
|
2017-04-22 05:41:37 +02:00
|
|
|
file(DOWNLOAD ${CENTRAL_REPO_URL}org/assertj/assertj-core/1.7.1/assertj-core-1.7.1.jar ${JAVA_TMP_JAR} STATUS downloadStatus)
|
2016-01-28 15:44:31 +01:00
|
|
|
list(GET downloadStatus 0 error_code)
|
|
|
|
if(NOT error_code EQUAL 0)
|
|
|
|
message(FATAL_ERROR "Failed downloading ${JAVA_ASSERTJ_JAR}")
|
|
|
|
endif()
|
|
|
|
file(RENAME ${JAVA_TMP_JAR} ${JAVA_ASSERTJ_JAR})
|
|
|
|
endif()
|
|
|
|
|
2017-11-28 21:13:20 +01:00
|
|
|
set(JNI_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/java/include)
|
|
|
|
|
|
|
|
file(MAKE_DIRECTORY ${JNI_OUTPUT_DIR})
|
|
|
|
create_javah(
|
|
|
|
TARGET rocksdbjni_headers
|
|
|
|
CLASSES ${NATIVE_JAVA_CLASSES}
|
|
|
|
CLASSPATH rocksdbjni_classes ${JAVA_TESTCLASSPATH}
|
|
|
|
OUTPUT_DIR ${JNI_OUTPUT_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
if(NOT MSVC)
|
|
|
|
set_property(TARGET ${ROCKSDB_STATIC_LIB} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
2016-07-27 01:18:49 +02:00
|
|
|
endif()
|
|
|
|
|
2017-11-28 21:13:20 +01:00
|
|
|
set(ROCKSDBJNI_STATIC_LIB rocksdbjni${ARTIFACT_SUFFIX})
|
|
|
|
add_library(${ROCKSDBJNI_STATIC_LIB} ${JNI_NATIVE_SOURCES})
|
|
|
|
add_dependencies(${ROCKSDBJNI_STATIC_LIB} rocksdbjni_headers)
|
|
|
|
target_link_libraries(${ROCKSDBJNI_STATIC_LIB} ${ROCKSDB_STATIC_LIB} ${LIBS})
|
|
|
|
|
|
|
|
if(NOT MINGW)
|
|
|
|
set(ROCKSDBJNI_SHARED_LIB rocksdbjni-shared${ARTIFACT_SUFFIX})
|
|
|
|
add_library(${ROCKSDBJNI_SHARED_LIB} SHARED ${JNI_NATIVE_SOURCES})
|
|
|
|
add_dependencies(${ROCKSDBJNI_SHARED_LIB} rocksdbjni_headers)
|
|
|
|
target_link_libraries(${ROCKSDBJNI_SHARED_LIB} ${ROCKSDB_STATIC_LIB} ${LIBS})
|
|
|
|
|
|
|
|
set_target_properties(
|
|
|
|
${ROCKSDBJNI_SHARED_LIB}
|
|
|
|
PROPERTIES
|
|
|
|
COMPILE_PDB_OUTPUT_DIRECTORY ${CMAKE_CFG_INTDIR}
|
|
|
|
COMPILE_PDB_NAME ${ROCKSDBJNI_STATIC_LIB}.pdb
|
|
|
|
)
|
|
|
|
endif()
|