forked from element-protocol/element-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (30 loc) · 1.02 KB
/
CMakeLists.txt
File metadata and controls
40 lines (30 loc) · 1.02 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
# Copyright (C) Caleb Marshall - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
# Written by Caleb Marshall <anythingtechpro@gmail.com>, November 2nd, 2018
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
cmake_minimum_required(VERSION 3.8)
project(element)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_C_FLAGS "-Wall -Wno-unused-variable")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_RELEASE "-O3")
set(MINIUPNP_STATIC ON)
find_package(Threads QUIET)
if(NOT Threads_FOUND)
message(FATAL_ERROR "Failed to find pthreads dependency!")
endif()
find_package(Sodium QUIET)
if(NOT SODIUM_FOUND)
message(FATAL_ERROR "Failed to find libsodium dependency!")
endif()
include_directories(${SODIUM_INCLUDE_DIR})
include_directories(include)
add_subdirectory(external/miniupnp/miniupnpc)
add_subdirectory(src)
add_subdirectory(tests)