-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·68 lines (55 loc) · 1.93 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.24)
include(${CMAKE_CURRENT_BINARY_DIR}/local_conf.cmake OPTIONAL)
include(FetchContent)
FetchContent_Declare(
ccommon
GIT_REPOSITORY https://github.com/EddyTheCo/Common.git
GIT_TAG v0.4.0)
FetchContent_MakeAvailable(ccommon)
version_from_git(LOG OFF TIMESTAMP "%Y%m%d%H%M%S")
project(
QtBip39
VERSION ${VERSION}
DESCRIPTION "Mnemonic sentences - Bip-39"
LANGUAGES CXX)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
include(GNUInstallDirs)
find_package(Qt6 COMPONENTS Core Network)
if(Qt6_FOUND)
qt_standard_project_setup()
add_library(qbip39 src/dictionaries.cpp include/crypto/qbip39.hpp
include/crypto/dictionaries.hpp)
add_library(${PROJECT_NAME}::qbip39 ALIAS qbip39)
set_target_properties(qbip39 PROPERTIES VERSION ${VERSION} SOVERSION
${VERSION_MAJOR})
target_compile_definitions(qbip39 PRIVATE WINDOWS_QBIP39)
target_link_libraries(qbip39 PUBLIC Qt6::Core Qt6::Network)
target_include_directories(
qbip39 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/Esterv/>")
install(
TARGETS qbip39
EXPORT ${PROJECT_NAME}-config
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT bip39
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bip39)
install(
DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/Esterv/
COMPONENT ${PROJECT_NAME})
build_exports()
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
build_cpack()
if(BUILD_TESTING)
include(CTest)
add_subdirectory(tests)
endif(BUILD_TESTING)
endif(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
endif(Qt6_FOUND)
if(BUILD_DOCS)
build_docs()
endif(BUILD_DOCS)