2018-05-09 03:01:27 +03:00
|
|
|
add_subdirectory(QR-Code-generator)
|
|
|
|
add_subdirectory(QR-Code-scanner)
|
|
|
|
add_subdirectory(daemon)
|
|
|
|
add_subdirectory(libwalletqt)
|
|
|
|
add_subdirectory(model)
|
2020-04-06 19:57:32 +03:00
|
|
|
add_subdirectory(openpgp)
|
2018-05-09 03:01:27 +03:00
|
|
|
add_subdirectory(zxcvbn-c)
|
|
|
|
|
2020-07-09 18:13:21 +03:00
|
|
|
qt5_add_resources(RESOURCES ../qml.qrc)
|
2018-05-09 03:01:27 +03:00
|
|
|
|
|
|
|
# Compile source files (.h/.cpp)
|
|
|
|
file(GLOB SOURCE_FILES
|
|
|
|
"*.h"
|
|
|
|
"*.cpp"
|
|
|
|
"main/*.h"
|
|
|
|
"main/*.cpp"
|
|
|
|
"libwalletqt/WalletManager.cpp"
|
2020-04-11 13:43:21 +03:00
|
|
|
"libwalletqt/WalletListenerImpl.cpp"
|
2018-05-09 03:01:27 +03:00
|
|
|
"libwalletqt/Wallet.cpp"
|
2020-04-11 13:43:21 +03:00
|
|
|
"libwalletqt/PassphraseHelper.cpp"
|
2018-05-09 03:01:27 +03:00
|
|
|
"libwalletqt/PendingTransaction.cpp"
|
|
|
|
"libwalletqt/TransactionHistory.cpp"
|
|
|
|
"libwalletqt/TransactionInfo.cpp"
|
|
|
|
"libwalletqt/QRCodeImageProvider.cpp" QR
|
|
|
|
"QR-Code-generator/BitBuffer.cpp"
|
|
|
|
"QR-Code-generator/QrCode.cpp"
|
|
|
|
"QR-Code-generator/QrSegment.cpp"
|
|
|
|
"libwalletqt/AddressBook.cpp"
|
|
|
|
"libwalletqt/Subaddress.cpp"
|
|
|
|
"libwalletqt/SubaddressAccount.cpp"
|
|
|
|
"libwalletqt/UnsignedTransaction.cpp"
|
|
|
|
"libwalletqt/WalletManager.h"
|
|
|
|
"libwalletqt/Wallet.h"
|
2020-04-11 13:43:21 +03:00
|
|
|
"libwalletqt/PassphraseHelper.h"
|
2018-05-09 03:01:27 +03:00
|
|
|
"libwalletqt/PendingTransaction.h"
|
|
|
|
"libwalletqt/TransactionHistory.h"
|
|
|
|
"libwalletqt/TransactionInfo.h"
|
|
|
|
"libwalletqt/QRCodeImageProvider.h"
|
|
|
|
"QR-Code-generator/BitBuffer.h"
|
|
|
|
"QR-Code-generator/QrCode.h"
|
|
|
|
"QR-Code-generator/QrSegment.h"
|
|
|
|
"libwalletqt/Transfer.h"
|
|
|
|
"libwalletqt/AddressBook.h"
|
|
|
|
"libwalletqt/Subaddress.h"
|
|
|
|
"libwalletqt/SubaddressAccount.h"
|
|
|
|
"libwalletqt/UnsignedTransaction.h"
|
2020-07-08 02:04:47 +03:00
|
|
|
"daemon/*.h"
|
|
|
|
"daemon/*.cpp"
|
|
|
|
"model/*.h"
|
|
|
|
"model/*.cpp"
|
|
|
|
"qt/*.h"
|
2018-05-09 03:01:27 +03:00
|
|
|
"qt/*.cpp"
|
|
|
|
)
|
2020-07-08 02:04:47 +03:00
|
|
|
if(APPLE)
|
|
|
|
list(APPEND SOURCE_FILES "qt/macoshelper.mm")
|
|
|
|
endif()
|
2018-05-09 03:01:27 +03:00
|
|
|
|
2019-10-02 18:11:59 +03:00
|
|
|
if(ENABLE_PASS_STRENGTH_METER)
|
|
|
|
file(GLOB PASS_STRENGTH_FILES
|
|
|
|
"zxcvbn-c/zxcvbn.h"
|
|
|
|
"zxcvbn-c/zxcvbn.c"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-05-09 03:01:27 +03:00
|
|
|
if(WITH_SCANNER)
|
|
|
|
file(GLOB QR_CODE_FILES
|
|
|
|
"QR-Code-generator/*.h"
|
|
|
|
"QR-Code-generator/*.cpp"
|
|
|
|
"QR-Code-scanner/*.h"
|
|
|
|
"QR-Code-scanner/*.cpp"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2019-10-08 14:42:52 +03:00
|
|
|
set(EXECUTABLE_FLAG)
|
|
|
|
if(MINGW)
|
|
|
|
set(EXECUTABLE_FLAG WIN32)
|
2019-12-20 15:27:47 +02:00
|
|
|
|
|
|
|
set(ICON ${PROJECT_SOURCE_DIR}/images/appicon.ico)
|
|
|
|
set(ICON_RC ${CMAKE_CURRENT_BINARY_DIR}/icon.rc)
|
|
|
|
set(ICON_RES ${CMAKE_CURRENT_BINARY_DIR}/icon.o)
|
|
|
|
file(WRITE ${ICON_RC} "IDI_ICON1 ICON DISCARDABLE \"${ICON}\"")
|
|
|
|
add_custom_command(OUTPUT ${ICON_RES} COMMAND windres ${ICON_RC} ${ICON_RES} MAIN_DEPENDENCY ${ICON_RC})
|
|
|
|
list(APPEND RESOURCES ${ICON_RES})
|
2019-10-08 14:42:52 +03:00
|
|
|
endif()
|
|
|
|
|
2020-07-09 09:11:54 +03:00
|
|
|
if(APPLE)
|
|
|
|
set(ICON ${PROJECT_SOURCE_DIR}/images/appicon.icns)
|
|
|
|
set_source_files_properties(${ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
|
|
|
list(APPEND RESOURCES ${ICON})
|
|
|
|
endif()
|
|
|
|
|
2020-05-13 17:26:14 +03:00
|
|
|
add_executable(monero-wallet-gui ${EXECUTABLE_FLAG} main/main.cpp
|
2019-10-02 18:11:59 +03:00
|
|
|
${SOURCE_FILES}
|
|
|
|
${PASS_STRENGTH_FILES}
|
|
|
|
${QR_CODE_FILES}
|
2019-12-20 15:27:47 +02:00
|
|
|
${RESOURCES}
|
2019-10-02 18:11:59 +03:00
|
|
|
)
|
2020-07-09 09:11:54 +03:00
|
|
|
|
|
|
|
set_target_properties(monero-wallet-gui PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
|
|
|
MACOSX_BUNDLE TRUE
|
|
|
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/share/Info.plist"
|
|
|
|
)
|
2018-05-09 03:01:27 +03:00
|
|
|
|
|
|
|
# OpenGL
|
2020-05-13 17:26:14 +03:00
|
|
|
target_include_directories(monero-wallet-gui PUBLIC ${OPENGL_INCLUDE_DIR})
|
2018-05-09 03:01:27 +03:00
|
|
|
message(STATUS "OpenGL: include dir at ${OPENGL_INCLUDE_DIR}")
|
|
|
|
message(STATUS "OpenGL: libraries at ${OPENGL_LIBRARIES}")
|
|
|
|
|
2020-05-13 17:26:14 +03:00
|
|
|
target_include_directories(monero-wallet-gui PUBLIC ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
|
2018-05-09 03:01:27 +03:00
|
|
|
|
|
|
|
file(GLOB_RECURSE SRC_SOURCES *.cpp)
|
|
|
|
file(GLOB_RECURSE SRC_HEADERS *.h)
|
|
|
|
|
2020-05-13 17:26:14 +03:00
|
|
|
target_include_directories(monero-wallet-gui PUBLIC
|
2018-05-09 03:01:27 +03:00
|
|
|
${CMAKE_SOURCE_DIR}/monero/include
|
|
|
|
${CMAKE_SOURCE_DIR}/monero/src
|
2020-03-08 17:30:34 +02:00
|
|
|
${CMAKE_SOURCE_DIR}/monero/external/easylogging++
|
|
|
|
${CMAKE_SOURCE_DIR}/monero/contrib/epee/include
|
2018-05-09 03:01:27 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/daemon
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/libwalletqt
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/model
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/QR-Code-generator
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/QR-Code-scanner
|
2019-10-02 18:11:59 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/zxcvbn-c
|
2018-05-09 03:01:27 +03:00
|
|
|
${LibUSB_INCLUDE_DIRS}
|
|
|
|
${HIDAPI_INCLUDE_DIRS}
|
|
|
|
${X11_INCLUDE_DIR}
|
|
|
|
${Boost_INCLUDE_DIRS}
|
|
|
|
${OPENSSL_INCLUDE_DIR}
|
|
|
|
${ZBAR_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
|
2020-05-13 17:26:14 +03:00
|
|
|
target_compile_definitions(monero-wallet-gui
|
2018-05-09 03:01:27 +03:00
|
|
|
PUBLIC
|
|
|
|
${Qt5Widgets_DEFINITIONS}
|
|
|
|
${Qt5Qml_DEFINITIONS}
|
|
|
|
)
|
|
|
|
|
2019-11-29 12:09:00 +02:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
2018-05-09 03:01:27 +03:00
|
|
|
|
2020-05-13 17:26:14 +03:00
|
|
|
target_link_libraries(monero-wallet-gui
|
2020-07-03 02:09:59 +03:00
|
|
|
wallet_merged
|
2019-10-02 18:11:59 +03:00
|
|
|
${LMDB_LIBRARY}
|
2020-07-03 02:09:59 +03:00
|
|
|
epee
|
2020-07-08 02:04:47 +03:00
|
|
|
${UNBOUND_LIBRARY}
|
2019-10-02 18:11:59 +03:00
|
|
|
${SODIUM_LIBRARY}
|
2020-07-03 02:09:59 +03:00
|
|
|
easylogging
|
|
|
|
blockchain_db
|
|
|
|
randomx
|
|
|
|
hardforks
|
2019-10-02 18:11:59 +03:00
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${OPENSSL_LIBRARIES}
|
|
|
|
${CMAKE_DL_LIBS}
|
|
|
|
${LibUSB_LIBRARIES}
|
|
|
|
${HIDAPI_LIBRARIES}
|
2019-10-07 15:07:09 +03:00
|
|
|
${QT5_LIBRARIES}
|
|
|
|
${EXTRA_LIBRARIES}
|
|
|
|
${ICU_LIBRARIES}
|
2020-04-06 19:57:32 +03:00
|
|
|
openpgp
|
2020-07-09 18:13:21 +03:00
|
|
|
translations
|
2018-05-09 03:01:27 +03:00
|
|
|
)
|
|
|
|
|
2020-06-17 14:37:36 +03:00
|
|
|
if(DEVICE_TREZOR_READY)
|
|
|
|
target_link_libraries(monero-wallet-gui ${TREZOR_DEP_LIBS})
|
|
|
|
endif()
|
|
|
|
|
2020-06-20 00:50:42 +03:00
|
|
|
if(X11_FOUND)
|
|
|
|
target_link_libraries(monero-wallet-gui ${X11_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2018-05-09 03:01:27 +03:00
|
|
|
if(WITH_SCANNER)
|
2020-05-13 17:26:14 +03:00
|
|
|
target_link_libraries(monero-wallet-gui
|
2018-05-09 03:01:27 +03:00
|
|
|
${ZBAR_LIBRARIES}
|
|
|
|
jpeg
|
|
|
|
v4l2
|
|
|
|
v4lconvert
|
|
|
|
rt
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-05-13 17:26:14 +03:00
|
|
|
install(TARGETS monero-wallet-gui
|
2019-10-02 18:11:59 +03:00
|
|
|
DESTINATION ${CMAKE_INSTALL_PREFIX}
|
2018-05-09 03:01:27 +03:00
|
|
|
)
|