|
|
@ -11,11 +11,13 @@ set(VERSION "beta-2")
|
|
|
|
|
|
|
|
|
|
|
|
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
|
|
|
option(FETCH_DEPS "Download dependencies if they are not found" ON)
|
|
|
|
option(XMRIG "Include XMRig module" ON)
|
|
|
|
option(XMRIG "Include XMRig module" ON)
|
|
|
|
option(OPENVR "Include OpenVR support" OFF)
|
|
|
|
option(OPENVR "Include OpenVR support")
|
|
|
|
option(QML "Include QtQuick (QML)" OFF)
|
|
|
|
option(QML "Include QtQuick (QML)")
|
|
|
|
option(TOR_BIN "Path to Tor binary to embed inside WOWlet" OFF)
|
|
|
|
option(ANDROID "Android deployment")
|
|
|
|
|
|
|
|
option(ANDROID_DEBUG "View the Android app on desktop")
|
|
|
|
|
|
|
|
option(TOR_BIN "Path to Tor binary to embed inside WOWlet")
|
|
|
|
option(STATIC "Link libraries statically, requires static Qt")
|
|
|
|
option(STATIC "Link libraries statically, requires static Qt")
|
|
|
|
option(USE_DEVICE_TREZOR "Trezor support compilation" OFF)
|
|
|
|
option(USE_DEVICE_TREZOR "Trezor support compilation")
|
|
|
|
option(DONATE_BEG "Prompt donation window every once in a while" ON)
|
|
|
|
option(DONATE_BEG "Prompt donation window every once in a while" ON)
|
|
|
|
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
|
|
|
|
include(CheckCCompilerFlag)
|
|
|
|
include(CheckCCompilerFlag)
|
|
|
@ -28,11 +30,11 @@ include(CheckSymbolExists)
|
|
|
|
|
|
|
|
|
|
|
|
set(WOWNERO_HEAD "f611d5c9e32bc62f1735f6571b0bdb95cc020531")
|
|
|
|
set(WOWNERO_HEAD "f611d5c9e32bc62f1735f6571b0bdb95cc020531")
|
|
|
|
set(BUILD_GUI_DEPS ON)
|
|
|
|
set(BUILD_GUI_DEPS ON)
|
|
|
|
set(ARCH "x86-64")
|
|
|
|
set(ARCH "x86-64" CACHE STRING "Target architecture")
|
|
|
|
set(BUILD_64 ON)
|
|
|
|
set(BUILD_64 ON CACHE BOOL "Build 64-bit binaries")
|
|
|
|
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
|
|
|
set(INSTALL_VENDORED_LIBUNBOUND ${STATIC})
|
|
|
|
set(USE_SINGLE_BUILDDIR ON)
|
|
|
|
set(USE_SINGLE_BUILDDIR ON)
|
|
|
|
if(OPENVR)
|
|
|
|
if(OPENVR OR ANDROID_DEBUG)
|
|
|
|
set(QML ON)
|
|
|
|
set(QML ON)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
@ -41,10 +43,7 @@ set(_CMAKE_BUILD_TYPE "")
|
|
|
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE)
|
|
|
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE)
|
|
|
|
if("${_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
|
|
|
if("${_CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
|
|
|
|
set(DEBUG ON)
|
|
|
|
set(DEBUG ON)
|
|
|
|
|
|
|
|
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
|
|
|
message(STATUS "OPENVR: ${OPENVR}")
|
|
|
|
|
|
|
|
message(STATUS "QML: ${QML}")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
|
|
|
|
check_include_file(sys/prctl.h HAVE_SYS_PRCTL_H)
|
|
|
@ -173,7 +172,7 @@ find_package(Boost 1.58 REQUIRED COMPONENTS
|
|
|
|
program_options
|
|
|
|
program_options
|
|
|
|
locale)
|
|
|
|
locale)
|
|
|
|
|
|
|
|
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
if(UNIX AND NOT APPLE AND NOT ANDROID)
|
|
|
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
|
|
# https://github.com/monero-project/monero-gui/issues/3142#issuecomment-705940446
|
|
|
|
# https://github.com/monero-project/monero-gui/issues/3142#issuecomment-705940446
|
|
|
|
set(CMAKE_SKIP_RPATH ON)
|
|
|
|
set(CMAKE_SKIP_RPATH ON)
|
|
|
@ -195,6 +194,17 @@ if("$ENV{DRONE}" STREQUAL "true")
|
|
|
|
message(STATUS "We are inside a static compile with Drone CI")
|
|
|
|
message(STATUS "We are inside a static compile with Drone CI")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
|
|
|
|
if(NOT CMAKE_PREFIX_PATH AND DEFINED ENV{CMAKE_PREFIX_PATH})
|
|
|
|
|
|
|
|
message(STATUS "Using CMAKE_PREFIX_PATH environment variable: '$ENV{CMAKE_PREFIX_PATH}'")
|
|
|
|
|
|
|
|
set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(APPLE AND NOT CMAKE_PREFIX_PATH)
|
|
|
|
|
|
|
|
execute_process(COMMAND brew --prefix qt5 OUTPUT_VARIABLE QT5_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
|
|
|
|
list(APPEND CMAKE_PREFIX_PATH ${QT5_DIR})
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
# To build WOWlet with embedded (and static) Tor, pass CMake -DTOR_BIN=/path/to/tor
|
|
|
|
# To build WOWlet with embedded (and static) Tor, pass CMake -DTOR_BIN=/path/to/tor
|
|
|
|
if(TOR_BIN)
|
|
|
|
if(TOR_BIN)
|
|
|
|
if(APPLE)
|
|
|
|
if(APPLE)
|
|
|
@ -249,7 +259,7 @@ if(MINGW)
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj")
|
|
|
|
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
|
|
|
set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt)
|
|
|
|
if(DEPENDS)
|
|
|
|
if(DEPENDS)
|
|
|
|
set(ICU_LIBRARIES iconv)
|
|
|
|
set(ICU_LIBRARIES iconv)
|
|
|
|
else()
|
|
|
|
else()
|
|
|
|
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
|
|
|
|
set(ICU_LIBRARIES icuio icuin icuuc icudt icutu iconv)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
@ -264,7 +274,7 @@ elseif(DRAGONFLY)
|
|
|
|
set(EXTRA_LIBRARIES execinfo ${COMPAT})
|
|
|
|
set(EXTRA_LIBRARIES execinfo ${COMPAT})
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
|
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "(SunOS|Solaris)")
|
|
|
|
set(EXTRA_LIBRARIES socket nsl resolv)
|
|
|
|
set(EXTRA_LIBRARIES socket nsl resolv)
|
|
|
|
elseif(NOT MSVC AND NOT DEPENDS)
|
|
|
|
elseif(NOT MSVC AND NOT DEPENDS AND NOT ANDROID)
|
|
|
|
find_library(RT rt)
|
|
|
|
find_library(RT rt)
|
|
|
|
set(EXTRA_LIBRARIES ${RT})
|
|
|
|
set(EXTRA_LIBRARIES ${RT})
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
@ -384,10 +394,6 @@ if(OPENVR)
|
|
|
|
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/openvr")
|
|
|
|
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/openvr")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
|
|
|
|
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/contrib/KDMacTouchBar")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(WITH_SCANNER)
|
|
|
|
if(WITH_SCANNER)
|
|
|
|
add_library(quirc STATIC
|
|
|
|
add_library(quirc STATIC
|
|
|
|
contrib/quirc/lib/decode.c
|
|
|
|
contrib/quirc/lib/decode.c
|
|
|
|