2019-06-20 23:13:52 +00:00
|
|
|
cmake_minimum_required (VERSION 2.8)
|
|
|
|
project(zt_core)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
add_definitions(-DNOMINMAX)
|
|
|
|
endif(WIN32)
|
|
|
|
|
2019-08-12 19:35:07 +00:00
|
|
|
set(core_headers
|
|
|
|
Address.hpp
|
|
|
|
AES.hpp
|
|
|
|
AtomicCounter.hpp
|
|
|
|
Buffer.hpp
|
|
|
|
C25519.hpp
|
|
|
|
Capability.hpp
|
|
|
|
CertificateOfMembership.hpp
|
|
|
|
CertificateOfOwnership.hpp
|
|
|
|
Constants.hpp
|
|
|
|
Credential.hpp
|
|
|
|
Dictionary.hpp
|
|
|
|
ECC384.hpp
|
|
|
|
Hashtable.hpp
|
|
|
|
Identity.hpp
|
|
|
|
InetAddress.hpp
|
|
|
|
Locator.hpp
|
|
|
|
MAC.hpp
|
|
|
|
Membership.hpp
|
|
|
|
Multicaster.hpp
|
|
|
|
MulticastGroup.hpp
|
|
|
|
Mutex.hpp
|
|
|
|
Network.hpp
|
|
|
|
NetworkConfig.hpp
|
|
|
|
Node.hpp
|
|
|
|
Packet.hpp
|
|
|
|
Path.hpp
|
|
|
|
Peer.hpp
|
|
|
|
Poly1305.hpp
|
|
|
|
RingBuffer.hpp
|
|
|
|
RuntimeEnvironment.hpp
|
|
|
|
Salsa20.hpp
|
2019-08-28 17:34:32 +00:00
|
|
|
ScopedPtr.hpp
|
2019-08-12 19:35:07 +00:00
|
|
|
SelfAwareness.hpp
|
|
|
|
SHA512.hpp
|
|
|
|
SharedPtr.hpp
|
|
|
|
Str.hpp
|
|
|
|
Switch.hpp
|
|
|
|
Tag.hpp
|
|
|
|
Topology.hpp
|
|
|
|
Trace.hpp
|
|
|
|
Utils.hpp
|
|
|
|
)
|
2019-09-13 16:35:49 +00:00
|
|
|
|
2019-08-12 19:35:07 +00:00
|
|
|
set(core_src
|
|
|
|
AES.cpp
|
2019-09-13 16:35:49 +00:00
|
|
|
AES-aesni.c
|
2019-08-12 19:35:07 +00:00
|
|
|
C25519.cpp
|
2019-08-14 21:55:37 +00:00
|
|
|
Credential.cpp
|
2019-08-12 19:35:07 +00:00
|
|
|
ECC384.cpp
|
|
|
|
Identity.cpp
|
|
|
|
IncomingPacket.cpp
|
|
|
|
InetAddress.cpp
|
|
|
|
Membership.cpp
|
|
|
|
Multicaster.cpp
|
|
|
|
Network.cpp
|
|
|
|
NetworkConfig.cpp
|
|
|
|
Node.cpp
|
|
|
|
Packet.cpp
|
|
|
|
Path.cpp
|
|
|
|
Peer.cpp
|
|
|
|
Poly1305.cpp
|
|
|
|
Salsa20.cpp
|
|
|
|
SelfAwareness.cpp
|
|
|
|
SHA512.cpp
|
|
|
|
Switch.cpp
|
|
|
|
Trace.cpp
|
|
|
|
Utils.cpp
|
|
|
|
)
|
2019-09-13 16:35:49 +00:00
|
|
|
|
2019-06-21 22:16:20 +00:00
|
|
|
add_library(${PROJECT_NAME} STATIC ${core_src} ${core_headers})
|
2019-08-01 21:36:35 +00:00
|
|
|
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
|
2019-08-16 16:52:13 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR})
|
2019-06-21 22:16:20 +00:00
|
|
|
|
2019-09-13 16:35:49 +00:00
|
|
|
#if(UNIX)
|
|
|
|
# set_source_files_properties(
|
|
|
|
# AES.cpp
|
|
|
|
# AES-aesni.c
|
|
|
|
# ECC384.cpp
|
|
|
|
# Salsa20.cpp
|
|
|
|
# C25519.cpp
|
|
|
|
# Poly1305.cpp
|
|
|
|
# PROPERTIES
|
|
|
|
# COMPILE_FLAGS "-Wall -O3"
|
|
|
|
# )
|
|
|
|
#endif(UNIX)
|