X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=CMakeLists.txt;h=9b23274e13b8b28efa5fe6e2f6def878524c8642;hb=a1b58519a99876a87225984de2c2c45f9445ca18;hp=41f91db1cb229207c11d8c3d43089d25be1931ee;hpb=d6019ac689b043f6a786e0429a9bda07c0c3489c;p=novacoin.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 41f91db..9b23274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,8 +3,8 @@ cmake_minimum_required(VERSION 3.4.1) ## ## mkdir build && cd build ## -## cmake -DBerkeleyDB_ROOT:STRING=/opt/homebrew/Cellar/berkeley-db@4/4.8.30 -DQt5_DIR:STRING=/opt/homebrew/Cellar/qt@5/5.15.2_1/lib/cmake/Qt5 -DUSE_LEVELDB=1 .. -## cmake -DUSE_LEVELDB=1 .. +## cmake -DBerkeleyDB_ROOT:STRING=/opt/homebrew/Cellar/berkeley-db@4/4.8.30 -DQt5_DIR:STRING=/opt/homebrew/Cellar/qt@5/5.15.2_1/lib/cmake/Qt5 .. +## cmake .. ## project(novacoin-qt VERSION 0.5.9 LANGUAGES C CXX) @@ -231,21 +231,16 @@ if (NOT BDB_FOUND) message(FATAL_ERROR "Unable to find ${BerkeleyDB_LIB_name} library in ${BerkeleyDB_LIBS} directory. Try to specify either library path via BerkeleyDB_LIBS or berkeley db root path via BerkeleyDB_ROOT variable. You can also use BerkeleyDB_LIB_name variable to provide alternative file name search for.") endif() -list(APPEND ALL_DEFINITIONS QT_GUI USE_QRCODE USE_IPV6) +list(APPEND ALL_DEFINITIONS QT_GUI USE_QRCODE USE_IPV6 BOOST_SPIRIT_THREADSAFE) -if(USE_LEVELDB) - # Disable useless targets - option(LEVELDB_BUILD_TESTS "Build LevelDB's unit tests" OFF) - option(LEVELDB_BUILD_BENCHMARKS "Build LevelDB's benchmarks" OFF) - option(LEVELDB_INSTALL "Install LevelDB's header and library" OFF) +# Disable useless targets +option(LEVELDB_BUILD_TESTS "Build LevelDB's unit tests" OFF) +option(LEVELDB_BUILD_BENCHMARKS "Build LevelDB's benchmarks" OFF) +option(LEVELDB_INSTALL "Install LevelDB's header and library" OFF) - add_subdirectory(src/additional/leveldb) - list(APPEND ALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/txdb-leveldb.cpp) - list(APPEND ALL_LIBRARIES leveldb) - list(APPEND ALL_DEFINITIONS USE_LEVELDB) -else() - list(APPEND ALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/txdb-bdb.cpp) -endif() +add_subdirectory(src/additional/leveldb) +list(APPEND ALL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/txdb-leveldb.cpp) +list(APPEND ALL_LIBRARIES leveldb) if (NOT USE_GENERIC_SCRYPT) list( APPEND ALL_SOURCES ${generic_sources} ${CMAKE_CURRENT_SOURCE_DIR}/src/crypto/scrypt/intrin/scrypt-intrin.cpp ) @@ -264,10 +259,9 @@ list(APPEND ALL_DEFINITIONS HAVE_BUILD_INFO) add_executable(novacoin-qt WIN32 ${ALL_SOURCES}) if (NOT MSVC) -list(APPEND ALL_LIBRARIES ssp) list(APPEND ALL_DEFINITIONS _FORTIFY_SOURCE=2) if (WIN32) -list(APPEND ALL_LIBRARIES mingw32) +list(APPEND ALL_LIBRARIES mingw32 ssp) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static") endif() endif()