-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
55 lines (44 loc) · 1.35 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
cmake_minimum_required(VERSION 3.25)
if(CMAKE_SYSTEM_NAME STREQUAL "Android")
message(FATAL_ERROR "Andoir is not supported")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
message("Build for Windows")
set(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
message("Build for Linux")
endif()
add_compile_definitions(NDEBUG)
set(CMAKE_CXX_FLAGS "-g2 -O3 -fPIC -pipe")
set(CMAKE_C_FLAGS "-g2 -O3 -fPIC -pipe")
add_compile_options(-g2 -O3 -fPIC -pipe)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Project name
project(
"RainTextCore"
VERSION 0.6.0
LANGUAGES CXX
)
include(include/include.cmake)
include(src/src.cmake)
add_subdirectory(lib)
include(cmake/CPM.cmake)
include(cmake/FasterBuild.cmake)
include_directories(./include)
add_library(${PROJECT_NAME} STATIC
${rain-text-core-headers}
${rain-text-core-sources}
)
target_link_libraries(${PROJECT_NAME} PUBLIC
cryptopp::cryptopp
scryptlib::scrypt
argon2lib::argon2
)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_subdirectory(tests)
else ()
message("tests are not available")
endif ()