@ -11,10 +11,7 @@ set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
option ( FETCH_DEPS "Download dependencies if they are not found" ON )
option ( XMRTO "Include Xmr.To module" ON )
option ( MORPHTOKEN "Include MorphToken module" ON )
option ( XMRIG "Path to XMRig binary to embed inside Feather" OFF )
option ( TOR "Path to Tor binary to embed inside Feather" OFF )
option ( TOR_VERSION "Optional git hash or tag of embedded Tor version" "tor-0.4.3.5" )
option ( BUILD_TOR "Build Tor" OFF )
option ( STATIC "Link libraries statically, requires static Qt" )
option ( USE_DEVICE_TREZOR "Trezor support compilation" OFF )
option ( DONATE_BEG "Prompt donation window every once in a while" ON )
@ -31,7 +28,7 @@ if(DEBUG)
set ( CMAKE_VERBOSE_MAKEFILE ON )
endif ( )
set ( MONERO_HEAD " 2fc0c6355d7f3756f9cc01f1165aeec42bc52201 ")
set ( MONERO_HEAD " a1404e92cb439ba0f120e7c4a579ed0b9a0372a4 ")
set ( BUILD_GUI_DEPS ON )
set ( ARCH "x86-64" )
set ( BUILD_64 ON )
@ -161,7 +158,6 @@ find_package(Boost 1.58 REQUIRED COMPONENTS
if ( UNIX AND NOT APPLE )
if ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" )
# h t t p s : / / g i t h u b . c o m / m o n e r o - p r o j e c t / m o n e r o - g u i / i s s u e s / 3 1 4 2 # i s s u e c o m m e n t - 7 0 5 9 4 0 4 4 6
set ( CMAKE_SKIP_RPATH ON )
endif ( )
@ -177,48 +173,47 @@ if(UNIX AND NOT APPLE)
endif ( )
endif ( )
if ( "$ENV{DRONE}" STREQUAL "true" )
message ( STATUS "We are inside a static compile with Drone CI ")
endif( )
# T o r / t o r s o c k s
set ( TOR_TAG "tor-0.4.3.5 ")
set( TOR_DIR "${CMAKE_SOURCE_DIR}/contrib/tor" )
# T o b u i l d F e a t h e r w i t h embedded ( and static ) T o r , p a s s C M a k e - D T O R = / p a t h / t o / t o r
if ( TOR )
if ( APPLE )
execute_process ( COMMAND bash -c "touch ${CMAKE_CURRENT_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib" )
endif ( )
# o n t h e b u i l d b o t T o r i s b a k e d i n t o t h e i m a g e
# - l i n u x : S e e ` D o c k e r f i l e `
# - w i n d o w s : h t t p s : / / g i t h u b . c o m / m x e / m x e / b l o b / 1 0 2 4 d c 7 d 2 d b 5 e b 7 d 5 d 3 c 6 4 a 2 c 1 2 b 5 f 5 9 2 5 7 2 f 1 c e / p l u g i n s / a p p s / t o r . m k
# - m a c o s : t a k e n f r o m T o r B r o w s e r o f f i c i a l r e l e a s e
set ( TOR_COPY_CMD "cp ${TOR} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/tor" )
message ( STATUS "${TOR_COPY_CMD}" )
execute_process ( COMMAND bash -c "${TOR_COPY_CMD}" RESULT_VARIABLE ret )
if ( ret EQUAL "1" )
message ( FATAL_ERROR "Tor copy failure: ${TOR_COPY_CMD}" )
endif ( )
if ( BUILD_TOR AND APPLE )
execute_process ( COMMAND bash -c "touch ${CMAKE_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib" )
ENDIF ( )
message ( STATUS "Embedding Tor binary at ${TOR}" )
else ( )
message ( STATUS "Skipping Tor inclusion because -DTOR=Off" )
if ( UNIX AND NOT APPLE )
set ( TOR_LIB "libtorsocks.so" )
elseif ( APPLE )
set ( TOR_LIB "libtorsocks.dylib" )
endif ( )
# T o b u i l d F e a t h e r w i t h embedded ( and static ) X M R i g , p a s s C M a k e - D X M R I G = / p a t h / t o / x m r i g
if ( XMRIG )
# o n t h e b u i l d b o t X M R i g i s b a k e d i n t o t h e i m a g e
# - l i n u x : S e e ` D o c k e r f i l e `
# - w i n d o w s : S e e ` D o c k e r f i l e _ w i n d o w s `
# - m a c o s : m a n u a l l y d o w n l o a d e d a n o f f i c i a l r e l e a s e
set ( XMRIG_COPY_CMD "cp ${XMRIG} ${CMAKE_CURRENT_SOURCE_DIR}/src/assets/exec/xmrig" )
message ( STATUS "${XMRIG_COPY_CMD}" )
execute_process ( COMMAND bash -c "${XMRIG_COPY_CMD}" RESULT_VARIABLE ret )
if ( ret EQUAL "1" )
message ( FATAL_ERROR "XMRig copy failure: ${XMRIG_COPY_CMD}" )
if ( "$ENV{DRONE}" STREQUAL "true" AND APPLE )
message ( STATUS "We are inside a static compile with Drone CI" )
# @ T O D O : t a k e n f r o m T o r B r o w s e r o f f i c i a l r e l e a s e f o r n o w
execute_process ( COMMAND bash -c "cp ~/tor/libevent-2.1.7.dylib ${CMAKE_SOURCE_DIR}/src/tor/libevent-2.1.7.dylib" )
execute_process ( COMMAND bash -c "cp ~/tor/tor ${CMAKE_SOURCE_DIR}/src/tor/tor" )
elseif ( "$ENV{DRONE}" STREQUAL "true" AND BUILD_TOR )
message ( STATUS "We are inside a static compile with Drone CI" )
if ( MINGW )
execute_process ( COMMAND bash -c "cp /mxe/usr/x86_64-w64-mingw32.static/bin/tor.exe ${CMAKE_SOURCE_DIR}/src/tor/tor.exe" )
elseif ( UNIX AND NOT APPLE )
execute_process ( COMMAND bash -c "cp /usr/local/tor/bin/tor ${CMAKE_SOURCE_DIR}/src/tor/tor" )
execute_process ( COMMAND bash -c "cp /usr/local/torsocks/lib/torsocks/* ${CMAKE_SOURCE_DIR}/src/tor/" )
endif ( )
message ( STATUS "Embedding XMRig binary at ${XMRIG}" )
else ( )
message ( STATUS "Skipping XMRig inclusion because -DXMRIG=Off" )
if ( BUILD_TOR )
if ( UNIX OR APPLE )
execute_process ( COMMAND bash -c "ls -al src/tor/${TOR_LIB} 2>/dev/null" WORKING_DIRECTORY ${ CMAKE_SOURCE_DIR } OUTPUT_VARIABLE TOR_FOUND OUTPUT_STRIP_TRAILING_WHITESPACE )
if ( TOR_FOUND )
message ( STATUS "${TOR_LIB} found, skipping Tor build" )
else ( )
message ( STATUS "${TOR_LIB} not found, building Tor" )
execute_process ( COMMAND bash -c "bash build_tor.sh ${TOR_TAG} ${CMAKE_SOURCE_DIR} 'ON'" WORKING_DIRECTORY ${ CMAKE_SOURCE_DIR } /contrib )
endif ( )
endif ( )
else ( )
message ( STATUS "Skipping Tor build because -DBUILD_TOR=OFF" )
endif ( )
endif ( )
if ( MINGW )
@ -366,8 +361,4 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 ${C_SECURITY_FLAGS}")
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${CXX_SECURITY_FLAGS}" )
set ( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LD_SECURITY_FLAGS} ${STATIC_FLAGS}" )
if ( APPLE )
add_subdirectory ( "${CMAKE_CURRENT_SOURCE_DIR}/contrib/KDMacTouchBar" )
endif ( )
add_subdirectory ( src )