@ -5,16 +5,7 @@ set(CMAKE_AUTOUIC ON)
# p t h r e a d
# p t h r e a d
find_package ( Threads REQUIRED )
find_package ( Threads REQUIRED )
find_package ( Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Svg Xml WebSockets )
# C o m p i l e t h e s e s o u r c e files ( .h/.cpp )
add_subdirectory ( libwalletqt )
add_subdirectory ( model )
add_subdirectory ( utils )
add_subdirectory ( openpgp )
qt5_add_resources ( RESOURCES assets.qrc )
# C o m p i l e s o u r c e files ( .h/.cpp )
file ( GLOB SOURCE_FILES
file ( GLOB SOURCE_FILES
" * . h "
" * . h "
" * . c p p "
" * . c p p "
@ -42,6 +33,35 @@ file(GLOB SOURCE_FILES
" d i a l o g / * . c p p "
" d i a l o g / * . c p p "
)
)
if ( QML )
find_package ( Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Svg Xml WebSockets Quick Qml QuickControls2 QmlImportScanner )
else ( )
find_package ( Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Svg Xml WebSockets )
endif ( )
if ( OPENVR )
# i n c l u d e s o m e e x t r a f i l e s
qt5_add_resources ( RESOURCES vr/qml.qrc )
file ( GLOB SOURCE_FILES_QML
" v r / * . h "
" v r / * . c p p "
" v r / u t i l s / * . h "
" v r / u t i l s / * . c p p "
)
list ( APPEND SOURCE_FILES ${ SOURCE_FILES_QML } )
if ( MINGW )
set ( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-deprecated-declarations" ) # @ T O D O : r e m o v e m e
endif ( )
endif ( )
add_subdirectory ( libwalletqt )
add_subdirectory ( model )
add_subdirectory ( utils )
add_subdirectory ( openpgp )
qt5_add_resources ( RESOURCES assets.qrc )
if ( TOR_BIN )
if ( TOR_BIN )
if ( APPLE )
if ( APPLE )
set ( ASSETS_TOR "assets_tor_macos.qrc" )
set ( ASSETS_TOR "assets_tor_macos.qrc" )
@ -118,6 +138,10 @@ target_include_directories(wowlet PUBLIC
$ { Q t 5 W e b S o c k e t s _ I N C L U D E _ D I R S }
$ { Q t 5 W e b S o c k e t s _ I N C L U D E _ D I R S }
)
)
if ( OPENVR )
target_include_directories ( wowlet PUBLIC ${ CMAKE_SOURCE_DIR } /contrib/ )
endif ( )
if ( DONATE_BEG )
if ( DONATE_BEG )
target_compile_definitions ( wowlet PRIVATE DONATE_BEG=1 )
target_compile_definitions ( wowlet PRIVATE DONATE_BEG=1 )
endif ( )
endif ( )
@ -130,6 +154,11 @@ if(XMRIG)
target_compile_definitions ( wowlet PRIVATE HAS_XMRIG=1 )
target_compile_definitions ( wowlet PRIVATE HAS_XMRIG=1 )
endif ( )
endif ( )
if ( OPENVR )
target_compile_definitions ( wowlet PRIVATE HAS_OPENVR=1 )
target_compile_definitions ( wowlet PUBLIC VR_API_PUBLIC )
endif ( )
if ( HAVE_SYS_PRCTL_H )
if ( HAVE_SYS_PRCTL_H )
target_compile_definitions ( wowlet PRIVATE HAVE_SYS_PRCTL_H=1 )
target_compile_definitions ( wowlet PRIVATE HAVE_SYS_PRCTL_H=1 )
endif ( )
endif ( )
@ -150,6 +179,17 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions ( wowlet PRIVATE QT_NO_DEBUG=1 )
target_compile_definitions ( wowlet PRIVATE QT_NO_DEBUG=1 )
endif ( )
endif ( )
add_definitions ( ${ QT_DEFINITIONS } )
if ( NOT "${CMAKE_BUILD_TYPE}" EQUAL "Debug" )
add_definitions ( -DQT_NO_DEBUG )
endif ( )
target_compile_definitions ( wowlet PUBLIC VR_API_PUBLIC )
if ( QML )
qt5_import_qml_plugins ( ${ PROJECT_NAME } )
endif ( )
target_compile_definitions ( wowlet
target_compile_definitions ( wowlet
P U B L I C
P U B L I C
$ { Q t 5 C o r e _ D E F I N I T I O N S }
$ { Q t 5 C o r e _ D E F I N I T I O N S }
@ -166,12 +206,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
if ( UNIX AND NOT APPLE )
if ( UNIX AND NOT APPLE )
# h t t p s : / / s t a c k o v e r f l o w . c o m / q u e s t i o n s / 5 7 7 6 6 6 2 0 / c m a k e - a d d - l i b r a r y - d o e s n t - i n i t i a l i z e - s t a t i c - g l o b a l - v a r i a b l e
# h t t p s : / / s t a c k o v e r f l o w . c o m / q u e s t i o n s / 5 7 7 6 6 6 2 0 / c m a k e - a d d - l i b r a r y - d o e s n t - i n i t i a l i z e - s t a t i c - g l o b a l - v a r i a b l e
# s o t h a t c o n t r i b / m o n e r o - s e e d / s r c / g f _ e l e m . c p p p r o p e r l y i n i t i a l i z e s . A b e t t e r s o l u t i o n i s w e l c o m e .
# s o t h a t c o n t r i b / m o n e r o - s e e d / s r c / g f _ e l e m . c p p p r o p e r l y i n i t i a l i z e s . A b e t t e r s o l u t i o n i s w e l c o m e .
target_link_libraries ( wowlet -Wl,--whole-archive monero-seed::monero-seed -Wl,--no-whole-archive )
target_link_libraries ( wowlet PUBLIC -Wl,--whole-archive monero-seed::monero-seed -Wl,--no-whole-archive )
else ( )
else ( )
target_link_libraries ( wowlet monero-seed::monero-seed)
target_link_libraries ( wowlet PUBLIC monero-seed::monero-seed)
endif ( )
endif ( )
target_link_libraries ( wowlet
# L i n k W o w n e r o c o r e l i b r a r i e s
target_link_libraries ( wowlet PUBLIC
w a l l e t _ m e r g e d
w a l l e t _ m e r g e d
$ { L M D B _ L I B R A R Y }
$ { L M D B _ L I B R A R Y }
e p e e
e p e e
@ -183,19 +224,51 @@ target_link_libraries(wowlet
$ { B o o s t _ L I B R A R I E S }
$ { B o o s t _ L I B R A R I E S }
$ { O P E N S S L _ L I B R A R I E S }
$ { O P E N S S L _ L I B R A R I E S }
$ { C M A K E _ D L _ L I B S }
$ { C M A K E _ D L _ L I B S }
$ { E X T R A _ L I B R A R I E S }
$ { E X T R A _ L I B R A R I E S } )
# L i n k Q t l i b r a r i e s
if ( QML )
target_link_libraries ( wowlet PUBLIC
Q t 5 : : C o r e
Q t 5 : : C o r e
Q t 5 : : W i d g e t s
Q t 5 : : W i d g e t s
Q t 5 : : G u i
Q t 5 : : G u i
Q t 5 : : N e t w o r k
Q t 5 : : N e t w o r k
Q t 5 : : S v g
Q t 5 : : S v g
Q t 5 : : Q S v g P l u g i n
Q t 5 : : Q S v g I c o n P l u g i n
Q t 5 : : X m l
Q t 5 : : X m l
Q t 5 : : W e b S o c k e t s
Q t 5 : : W e b S o c k e t s
Q t 5 : : Q u i c k
Q t 5 : : Q m l
Q t 5 : : Q u i c k C o n t r o l s 2 )
else ( )
target_link_libraries ( wowlet PUBLIC
Q t 5 : : C o r e
Q t 5 : : W i d g e t s
Q t 5 : : G u i
Q t 5 : : N e t w o r k
Q t 5 : : S v g
Q t 5 : : X m l
Q t 5 : : W e b S o c k e t s )
endif ( )
# L i n k r a n d o m o t h e r s t u f f
target_link_libraries ( wowlet PUBLIC
$ { I C U _ L I B R A R I E S }
$ { I C U _ L I B R A R I E S }
o p e n p g p
o p e n p g p
T h r e a d s : : T h r e a d s
T h r e a d s : : T h r e a d s
$ { Q R E N C O D E _ L I B R A R Y }
$ { Q R E N C O D E _ L I B R A R Y } )
)
# L i n k O p e n V R
if ( OPENVR )
if ( MINGW )
target_link_libraries ( wowlet PUBLIC
o p e n v r _ a p i 6 4
g c c s t d c + + w i n p t h r e a d s s p g l u 3 2 o p e n g l 3 2 g l m f 3 2 - d y n a m i c )
else ( )
target_link_libraries ( wowlet PUBLIC openvr_api )
endif ( )
endif ( )
if ( APPLE )
if ( APPLE )
target_link_libraries ( wowlet
target_link_libraries ( wowlet
@ -206,14 +279,14 @@ if(APPLE)
endif ( )
endif ( )
if ( NOT APPLE )
if ( NOT APPLE )
target_link_libraries ( wowlet
target_link_libraries ( wowlet PUBLIC
Q t 5 : : Q S v g I c o n P l u g i n
Q t 5 : : Q S v g I c o n P l u g i n
Q t 5 : : Q S v g P l u g i n
Q t 5 : : Q S v g P l u g i n
)
)
endif ( )
endif ( )
if ( STATIC )
if ( STATIC )
target_link_libraries ( wowlet
target_link_libraries ( wowlet PUBLIC
Q t 5 : : Q S v g I c o n P l u g i n
Q t 5 : : Q S v g I c o n P l u g i n
Q t 5 : : Q S v g P l u g i n )
Q t 5 : : Q S v g P l u g i n )
if ( UNIX AND NOT APPLE )
if ( UNIX AND NOT APPLE )
@ -223,7 +296,7 @@ if(STATIC)
endif ( )
endif ( )
if ( X11_FOUND )
if ( X11_FOUND )
target_link_libraries ( wowlet ${ X11_LIBRARIES } )
target_link_libraries ( wowlet PUBLIC ${ X11_LIBRARIES } )
endif ( )
endif ( )
if ( APPLE )
if ( APPLE )