Marek Kotewicz
10 years ago
4 changed files with 56 additions and 1 deletions
@ -0,0 +1,22 @@ |
|||||
|
if(APPLE) |
||||
|
ExternalProject_Add(leveldb |
||||
|
DEPENDS snappy |
||||
|
URL https://leveldb.googlecode.com/files/leveldb-1.15.0.tar.gz |
||||
|
BINARY_DIR leveldb-prefix/src/leveldb |
||||
|
CONFIGURE_COMMAND patch < ${CMAKE_CURRENT_SOURCE_DIR}/leveldb_osx.patch |
||||
|
BUILD_COMMAND export ETH_DEPENDENCY_INSTALL_DIR=${ETH_DEPENDENCY_INSTALL_DIR} && make -j 3 |
||||
|
INSTALL_COMMAND cp -rf include/leveldb ${ETH_DEPENDENCY_INSTALL_DIR}/include/ && mv libleveldb.a ${ETH_DEPENDENCY_INSTALL_DIR}/lib && mv libleveldb.dylib.1.15 ${ETH_DEPENDENCY_INSTALL_DIR}/lib/libleveldb.dylib |
||||
|
) |
||||
|
elseif(WIN32) |
||||
|
ExternalProject_Add(leveldb |
||||
|
GIT_REPOSITORY https://code.google.com/p/leveldb |
||||
|
GIT_TAG windows |
||||
|
BINARY_DIR leveldb-prefix/src/leveldb |
||||
|
CONFIGURE_COMMAND "" |
||||
|
BUILD_COMMAND "" |
||||
|
INSTALL_COMMAND "" |
||||
|
) |
||||
|
else() |
||||
|
|
||||
|
endif() |
||||
|
|
@ -0,0 +1,18 @@ |
|||||
|
--- Makefile 2014-11-07 00:54:05.000000000 +0100
|
||||
|
+++ MakefilePatch 2014-11-07 00:56:59.000000000 +0100
|
||||
|
@@ -17,11 +17,11 @@
|
||||
|
# this file is generated by the previous line to set build flags and sources |
||||
|
include build_config.mk |
||||
|
|
||||
|
-CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
|
||||
|
-CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT)
|
||||
|
+CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
|
||||
|
+CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT) -DSNAPPY -I$(ETH_DEPENDENCY_INSTALL_DIR)/include
|
||||
|
|
||||
|
-LDFLAGS += $(PLATFORM_LDFLAGS)
|
||||
|
-LIBS += $(PLATFORM_LIBS)
|
||||
|
+LDFLAGS += $(PLATFORM_LDFLAGS) -L$(ETH_DEPENDENCY_INSTALL_DIR)/lib
|
||||
|
+LIBS += $(PLATFORM_LIBS) -lsnappy
|
||||
|
|
||||
|
LIBOBJECTS = $(SOURCES:.cc=.o) |
||||
|
MEMENVOBJECTS = $(MEMENV_SOURCES:.cc=.o) |
@ -0,0 +1,14 @@ |
|||||
|
if(APPLE) |
||||
|
ExternalProject_Add(snappy |
||||
|
URL https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz |
||||
|
BINARY_DIR snappy-prefix/src/snappy |
||||
|
CONFIGURE_COMMAND ./configure --disable-dependency-tracking --prefix=${ETH_DEPENDENCY_INSTALL_DIR} |
||||
|
BUILD_COMMAND "" |
||||
|
INSTALL_COMMAND make install |
||||
|
) |
||||
|
elseif(WIN32) |
||||
|
|
||||
|
else() |
||||
|
|
||||
|
endif() |
||||
|
|
Loading…
Reference in new issue