2022-05-10 20:10:34 +00:00
|
|
|
# Light helpers library expected to be used by all other libraries
|
|
|
|
#
|
|
|
|
cmake_minimum_required(VERSION 3.21)
|
|
|
|
|
|
|
|
project(StatusGoQt
|
|
|
|
VERSION 0.1.0
|
|
|
|
LANGUAGES CXX)
|
|
|
|
|
|
|
|
set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS true)
|
|
|
|
|
2022-07-07 18:16:59 +00:00
|
|
|
find_package(nlohmann_json 3.10.5 REQUIRED)
|
2022-07-21 18:04:11 +00:00
|
|
|
find_package(Boost)
|
2022-07-07 18:16:59 +00:00
|
|
|
|
|
|
|
find_package(Qt6 ${STATUS_QT_VERSION} COMPONENTS Core Concurrent Gui REQUIRED)
|
2022-05-10 20:10:34 +00:00
|
|
|
qt6_standard_project_setup()
|
|
|
|
|
2022-07-04 21:14:13 +00:00
|
|
|
add_library(${PROJECT_NAME} SHARED)
|
2022-05-10 20:10:34 +00:00
|
|
|
|
|
|
|
# Use by linker only
|
|
|
|
set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug)
|
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME}
|
2022-07-04 21:14:13 +00:00
|
|
|
PUBLIC
|
2022-07-07 18:16:59 +00:00
|
|
|
Status::Helpers
|
2022-07-21 18:04:11 +00:00
|
|
|
Boost::headers
|
2022-07-07 18:16:59 +00:00
|
|
|
|
|
|
|
PRIVATE
|
|
|
|
Qt6::Gui
|
2022-05-10 20:10:34 +00:00
|
|
|
Qt6::Core
|
2022-07-04 21:14:13 +00:00
|
|
|
Qt6::Concurrent
|
2022-05-10 20:10:34 +00:00
|
|
|
|
2022-07-07 18:16:59 +00:00
|
|
|
nlohmann_json::nlohmann_json
|
|
|
|
|
2022-05-10 20:10:34 +00:00
|
|
|
statusgo_shared
|
|
|
|
)
|
2022-07-04 21:14:13 +00:00
|
|
|
add_library(Status::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
2022-05-10 20:10:34 +00:00
|
|
|
|
2022-07-07 18:16:59 +00:00
|
|
|
target_include_directories(${PROJECT_NAME}
|
|
|
|
PRIVATE
|
2022-08-03 12:43:33 +00:00
|
|
|
src/StatusGo
|
2022-07-07 18:16:59 +00:00
|
|
|
# TODO: Workaround to QML_ELEMENT Qt6
|
|
|
|
INTERFACE
|
2022-08-03 12:43:33 +00:00
|
|
|
src/StatusGo
|
2022-07-07 18:16:59 +00:00
|
|
|
|
|
|
|
PUBLIC
|
2022-08-03 12:43:33 +00:00
|
|
|
src
|
2022-07-07 18:16:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_subdirectory(tests)
|
|
|
|
|
2022-05-10 20:10:34 +00:00
|
|
|
# Copy status-go lib close to the executable
|
|
|
|
# Temporary workaround; TODO: see a better alternative that doesn't depend on target order (dedicated dependencies dir?)
|
2022-07-04 21:14:13 +00:00
|
|
|
# and current directory (on mac). Use bundle or set rpath relative to executable
|
2022-05-10 20:10:34 +00:00
|
|
|
get_target_property(STATUSGO_LIBRARY_PATH statusgo_shared IMPORTED_LOCATION)
|
2022-07-04 21:14:13 +00:00
|
|
|
add_custom_command(
|
|
|
|
TARGET
|
|
|
|
${PROJECT_NAME}
|
|
|
|
POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy
|
|
|
|
$<TARGET_FILE:statusgo_shared>
|
|
|
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
|
|
|
COMMENT "Copying status-go lib beside project executable"
|
|
|
|
)
|
2022-06-07 10:58:06 +00:00
|
|
|
|
|
|
|
install(
|
2022-07-04 21:14:13 +00:00
|
|
|
IMPORTED_RUNTIME_ARTIFACTS
|
|
|
|
statusgo_shared
|
|
|
|
)
|
2022-07-07 18:16:59 +00:00
|
|
|
|
|
|
|
target_sources(${PROJECT_NAME}
|
|
|
|
PRIVATE
|
2022-08-03 12:43:33 +00:00
|
|
|
src/StatusGo/General.h
|
|
|
|
src/StatusGo/General.cpp
|
|
|
|
src/StatusGo/Types.h
|
|
|
|
src/StatusGo/Utils.h
|
|
|
|
src/StatusGo/Utils.cpp
|
|
|
|
|
|
|
|
src/StatusGo/Accounts/Accounts.h
|
|
|
|
src/StatusGo/Accounts/Accounts.cpp
|
|
|
|
src/StatusGo/Accounts/accounts_types.h
|
|
|
|
src/StatusGo/Accounts/AccountsAPI.h
|
|
|
|
src/StatusGo/Accounts/AccountsAPI.cpp
|
|
|
|
src/StatusGo/Accounts/ChatOrWalletAccount.h
|
|
|
|
src/StatusGo/Accounts/ChatOrWalletAccount.cpp
|
|
|
|
|
|
|
|
src/StatusGo/Chat/ChatAPI.h
|
|
|
|
src/StatusGo/Chat/ChatAPI.cpp
|
|
|
|
src/StatusGo/Chat/ChatDto.h
|
|
|
|
src/StatusGo/Chat/ChatDto.cpp
|
|
|
|
|
|
|
|
src/StatusGo/Messenger/Service.h
|
|
|
|
src/StatusGo/Messenger/Service.cpp
|
|
|
|
|
|
|
|
src/StatusGo/Metadata/api_response.h
|
|
|
|
src/StatusGo/Metadata/api_response.cpp
|
|
|
|
|
|
|
|
src/StatusGo/SignalsManager.h
|
|
|
|
src/StatusGo/SignalsManager.cpp
|
|
|
|
|
|
|
|
src/StatusGo/Settings/SettingsAPI.h
|
|
|
|
src/StatusGo/Settings/SettingsAPI.cpp
|
|
|
|
src/StatusGo/Settings/SettingsDto.h
|
|
|
|
src/StatusGo/Settings/SettingsDto.cpp
|
|
|
|
|
|
|
|
src/StatusGo/Wallet/BigInt.h
|
|
|
|
src/StatusGo/Wallet/BigInt.cpp
|
|
|
|
src/StatusGo/Wallet/DerivedAddress.h
|
|
|
|
src/StatusGo/Wallet/NetworkConfiguration.h
|
|
|
|
src/StatusGo/Wallet/Token.h
|
|
|
|
src/StatusGo/Wallet/wallet_types.h
|
|
|
|
src/StatusGo/Wallet/WalletApi.h
|
|
|
|
src/StatusGo/Wallet/WalletApi.cpp
|
2022-07-07 18:16:59 +00:00
|
|
|
)
|