diff --git a/configure b/configure index 32c518d..0cdf6ac 100755 --- a/configure +++ b/configure @@ -80,9 +80,11 @@ build_dir=src/leveldb-mcpe/build "-DCMAKE_AR=${AR}" \ "-DCMAKE_RANLIB=${RANLIB}" \ -DCMAKE_BUILD_TYPE=Release \ - -DLEVELDB_BUILD_TESTS:BOOL=OFF \ + -DBUILD_SHARED_LIBS:bool=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE:bool=ON \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_CXX_EXTENSIONS:BOOL=OFF \ + -DLEVELDB_BUILD_TESTS:BOOL=OFF \ -Wno-dev ) diff --git a/src/Makevars.win b/src/Makevars.win index c6d5971..0ed0a87 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,3 +1,4 @@ + PKG_CFLAGS = $(C_VISIBILITY) PKG_CXXFLAGS = $(CXX_VISIBILITY) PKG_CPPFLAGS = -pthread -I./leveldb-mcpe/include -I./leveldb-mcpe/build/include @@ -11,7 +12,7 @@ $(shell mkdir -p leveldb-mcpe/build) leveldb-mcpe/build/libleveldb.a: leveldb-mcpe/Makefile.mingw leveldb-mcpe/build/include/port/port_config.h $(MAKE) --directory=leveldb-mcpe/build -f ../Makefile.mingw \ - CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \ + CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) $(CXXPICFLAGS)" \ AR="$(AR)" RANLIB="$(RANLIB)" leveldb-mcpe/build/include/port/port_config.h: leveldb-mcpe/port_config.h.mingw diff --git a/src/dummy.cpp b/src/dummy.cpp new file mode 100644 index 0000000..c240699 --- /dev/null +++ b/src/dummy.cpp @@ -0,0 +1,3 @@ +/* This file is a dummy to signal to R that we need to link using a C++ + * compiler. + */