status-desktop/libs/Helpers/CMakeLists.txt
Stefan a710558c6b chore(CPP): foundation for user onboarding
Contains minimal account creation and login

Considerations:

- migrated status-go wrapper and login code from the fix/cpp-structure (241eec)
- Minimal refactoring and changes at the moment. Expect further refactoring
follow up to reach the desired state.
- Fix missing keychain initialization
- Fix accounts DB initialization call done by startup -> Controller.openedAccounts -> status-go.OpenAccounts calls
- Small refactoring and todos for other steps
- fix SignalsManager
- fix async access to dereferenced status-go memory from SignalsManager
- fix SignalsManager not starting when registering
- finish dev end to end test for create account and login
- small improvements and added TODOs for future work
- add onboarding test helpers and start messaging test
- Refactoring towards Login UI integration

Closes: #5909
Closes: #6028
2022-07-07 23:23:09 +02:00

69 lines
1.8 KiB
CMake

# Light helpers library expected to be used by all other libraries
#
cmake_minimum_required(VERSION 3.21)
project(Helpers
VERSION 0.1.0
LANGUAGES CXX)
set(QT_NO_CREATE_VERSIONLESS_FUNCTIONS true)
find_package(Qt6 ${STATUS_QT_VERSION} COMPONENTS Quick Qml REQUIRED)
qt6_standard_project_setup()
add_library(Helpers SHARED)
add_library(Status::Helpers ALIAS Helpers)
# Setup configuration type (Debug/Release)
# Inspired by https://programmingrecluse.wordpress.com/2020/02/04/detect-debug-build-with-cmake/
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES Debug Release)
elseif(NOT CMAKE_BUILD_TYPE)
message("Missing Build Type! Run cmake with:\n-DCMAKE_BUILD_TYPE=Debug|Release")
endif()
# Use by linker only
set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug)
# Setup BUILD_DEBUG and BUILD_REALEASE if single configuration builds
if(CMAKE_BUILD_TYPE)
string(TOUPPER "${CMAKE_BUILD_TYPE}" _upper_build_type)
set(BUILD_${_upper_build_type} true)
endif()
set(BUILD_GENERATED_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/generated)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/template/BuildConfiguration.h.in"
"${BUILD_GENERATED_DIRECTORY}/Helpers/BuildConfiguration.h"
@ONLY)
target_include_directories(Helpers
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/src
${BUILD_GENERATED_DIRECTORY}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/Helpers
${BUILD_GENERATED_DIRECTORY}/Helpers
)
target_link_libraries(Helpers
PRIVATE
Qt6::Quick
Qt6::Qml
)
install(
TARGETS
Helpers
RUNTIME
)
target_sources(Helpers
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/Helpers/helpers.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Helpers/logs.h
${CMAKE_CURRENT_SOURCE_DIR}/src/Helpers/logs.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/Helpers/Singleton.h
)