mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
cmake-rewrite
This commit is contained in:
parent
66c2b5d8ad
commit
e3d8ab8281
70 changed files with 1547 additions and 4762 deletions
41
external/CMakeLists.txt
vendored
41
external/CMakeLists.txt
vendored
|
@ -28,45 +28,8 @@
|
|||
#
|
||||
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
|
||||
|
||||
|
||||
# This is broken up into two parts: first we check for miniupnp, compile it if we can't
|
||||
# find it, and thereafter we check for libunbound, and compile it if we can't find it.
|
||||
# We always compile if we are building statically to reduce static dependency issues...
|
||||
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
|
||||
# others.
|
||||
|
||||
find_package(Miniupnpc REQUIRED)
|
||||
|
||||
message(STATUS "Using in-tree miniupnpc")
|
||||
set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
|
||||
add_subdirectory(miniupnp/miniupnpc)
|
||||
set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
||||
set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
if(MSVC)
|
||||
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
|
||||
elseif(NOT MSVC)
|
||||
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
|
||||
endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
|
||||
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE")
|
||||
endif()
|
||||
|
||||
set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
||||
|
||||
find_package(Unbound)
|
||||
|
||||
if(NOT UNBOUND_INCLUDE_DIR)
|
||||
die("Could not find libunbound")
|
||||
else()
|
||||
message(STATUS "Found libunbound include (unbound.h) in ${UNBOUND_INCLUDE_DIR}")
|
||||
if(UNBOUND_LIBRARIES)
|
||||
message(STATUS "Found libunbound library")
|
||||
else()
|
||||
die("Found libunbound includes, but could not find libunbound library. Please make sure you have installed libunbound or libunbound-dev or the equivalent")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_subdirectory(db_drivers)
|
||||
add_subdirectory(easylogging++)
|
||||
add_subdirectory(qrcodegen)
|
||||
add_subdirectory(randomwow EXCLUDE_FROM_ALL)
|
||||
add_subdirectory(randomwow)
|
||||
add_subdirectory(supercop)
|
53
external/db_drivers/liblmdb/CMakeLists.txt
vendored
53
external/db_drivers/liblmdb/CMakeLists.txt
vendored
|
@ -26,40 +26,37 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
set(lmdb_sources
|
||||
mdb.c
|
||||
midl.c)
|
||||
|
||||
add_library(lmdb)
|
||||
target_sources(lmdb PRIVATE ${lmdb_sources})
|
||||
|
||||
target_include_directories(lmdb
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
target_link_libraries(lmdb PRIVATE Threads::Threads)
|
||||
|
||||
if(FREEBSD)
|
||||
add_definitions(-DMDB_DSYNC=O_SYNC)
|
||||
target_compile_definitions(lmdb PUBLIC MDB_DSYNC=O_SYNC)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
add_definitions("-DANDROID=1")
|
||||
target_compile_definitions(lmdb PUBLIC ANDROID=1)
|
||||
endif()
|
||||
|
||||
|
||||
set (lmdb_sources
|
||||
mdb.c
|
||||
midl.c)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
add_library(lmdb
|
||||
${lmdb_sources})
|
||||
target_link_libraries(lmdb
|
||||
PRIVATE
|
||||
${CMAKE_THREAD_LIBS_INIT})
|
||||
if(${ARCH_WIDTH} EQUAL 32)
|
||||
target_compile_definitions(lmdb
|
||||
PUBLIC -DMDB_VL32)
|
||||
target_compile_definitions(lmdb PUBLIC MDB_VL32=1)
|
||||
endif()
|
||||
|
||||
# GUI/libwallet install target
|
||||
if (BUILD_GUI_DEPS)
|
||||
if(IOS)
|
||||
set(lib_folder lib-${ARCH})
|
||||
else()
|
||||
set(lib_folder lib)
|
||||
endif()
|
||||
install(TARGETS lmdb
|
||||
ARCHIVE DESTINATION ${lib_folder}
|
||||
LIBRARY DESTINATION ${lib_folder})
|
||||
endif()
|
||||
set_property(TARGET lmdb APPEND PROPERTY COMPILE_FLAGS "-fPIC")
|
||||
set_target_properties(lmdb PROPERTIES
|
||||
POSITION_INDEPENDENT_CODE ON
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
)
|
||||
|
||||
monero_install_library(lmdb)
|
||||
|
|
56
external/easylogging++/CMakeLists.txt
vendored
56
external/easylogging++/CMakeLists.txt
vendored
|
@ -26,43 +26,29 @@
|
|||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
add_library(easylogging)
|
||||
target_sources(easylogging
|
||||
PUBLIC
|
||||
FILE_SET HEADERS
|
||||
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/easylogging++.h
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/easylogging++.cc
|
||||
)
|
||||
|
||||
project(easylogging CXX)
|
||||
target_compile_definitions(easylogging PUBLIC
|
||||
AUTO_INITIALIZE_EASYLOGGINGPP
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
target_include_directories(easylogging
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
monero_enable_coverage()
|
||||
|
||||
find_package(Threads)
|
||||
find_package(Backtrace)
|
||||
|
||||
monero_find_all_headers(EASYLOGGING_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
add_library(easylogging
|
||||
easylogging++.cc
|
||||
${EASYLOGGING_HEADERS}
|
||||
)
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
target_link_libraries(easylogging
|
||||
PRIVATE
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${Backtrace_LIBRARIES})
|
||||
|
||||
# GUI/libwallet install target
|
||||
if (BUILD_GUI_DEPS)
|
||||
if(IOS)
|
||||
set(lib_folder lib-${ARCH})
|
||||
else()
|
||||
set(lib_folder lib)
|
||||
endif()
|
||||
install(TARGETS easylogging
|
||||
ARCHIVE DESTINATION ${lib_folder}
|
||||
LIBRARY DESTINATION ${lib_folder})
|
||||
endif()
|
||||
set_property(TARGET easylogging APPEND PROPERTY COMPILE_FLAGS "-fPIC")
|
||||
PRIVATE
|
||||
Threads::Threads
|
||||
${Backtrace_LIBRARIES})
|
||||
|
||||
monero_install_library(easylogging)
|
||||
|
|
1
external/miniupnp
vendored
1
external/miniupnp
vendored
|
@ -1 +0,0 @@
|
|||
Subproject commit 544e6fcc73c5ad9af48a8985c94f0f1d742ef2e0
|
22
external/qrcodegen/CMakeLists.txt
vendored
22
external/qrcodegen/CMakeLists.txt
vendored
|
@ -1,8 +1,18 @@
|
|||
project(libqrcodegen)
|
||||
add_library(qrcodegen)
|
||||
|
||||
add_library(qrcodegen STATIC QrCode.cpp)
|
||||
set_target_properties(qrcodegen PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
set_target_properties(qrcodegen PROPERTIES CXX_STANDARD 11)
|
||||
target_sources(qrcodegen
|
||||
PUBLIC
|
||||
FILE_SET HEADERS
|
||||
BASE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/QrCode.hpp
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/QrCode.cpp
|
||||
)
|
||||
|
||||
target_include_directories(qrcodegen PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(qrcodegen
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
monero_install_library(qrcodegen)
|
||||
|
|
2
external/randomwow
vendored
2
external/randomwow
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 27b099b6dd6fef6e17f58c6dfe00009e9c5df587
|
||||
Subproject commit bb4ed329c76493cc07a5c5bfae041b28434d9caf
|
1
external/rapidjson
vendored
1
external/rapidjson
vendored
|
@ -1 +0,0 @@
|
|||
Subproject commit 129d19ba7f496df5e33658527a7158c79b99c21c
|
2
external/supercop
vendored
2
external/supercop
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 633500ad8c8759995049ccd022107d1fa8a1bbc9
|
||||
Subproject commit 036511a8bdc0883059d107aeb2910b54ee0a061b
|
Loading…
Add table
Add a link
Reference in a new issue