-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
54 lines (42 loc) · 1.74 KB
/
Copy pathCMakeLists.txt
File metadata and controls
54 lines (42 loc) · 1.74 KB
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
cmake_minimum_required(VERSION 3.27)
# set the project name
project(cpp_crypto_algos LANGUAGES CXX VERSION 2.0)
# compile_commands.json for clangd / VS Code C++ (must exist — IntelliSense uses ${workspaceFolder}/build/compile_commands.json)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Generate compile_commands.json for IDE tooling" FORCE)
# Multi-config generators (Ninja Multi-Config, MSVC): only Debug and Release
if(CMAKE_CONFIGURATION_TYPES)
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Available configurations" FORCE)
endif()
# websocketpp (and similar deps) use legacy project() without VERSION; default CMP0048 for subdirs avoids noisy CMake dev warnings.
set(CMAKE_POLICY_DEFAULT_CMP0048 OLD)
include(FetchContent)
cmake_language(CALL FetchContent_Declare ccapi
GIT_REPOSITORY https://github.com/profitviews/ccapi.git
GIT_TAG windows-msvc
)
cmake_language(CALL FetchContent_Declare websocketpp
GIT_REPOSITORY https://github.com/zaphoyd/websocketpp.git
GIT_TAG develop
)
cmake_language(CALL FetchContent_Declare csv2
GIT_REPOSITORY https://github.com/p-ranav/csv2
GIT_TAG master
)
cmake_language(CALL FetchContent_MakeAvailable ccapi websocketpp csv2)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake )
find_package(Boost REQUIRED)
find_package(fmt REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(RapidJSON REQUIRED)
find_package(Threads REQUIRED)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
configure_file(cmake/cpp_crypto_algos_config.hpp.in cpp_crypto_algos_config.hpp)
include(CTest)
include(clang_format)
add_subdirectory(src)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif()