123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- cmake_minimum_required (VERSION 3.0)
- project(zt_core)
- configure_file(
- version.h.in
- version.h
- )
- set(core_headers
- zerotier.h
- Address.hpp
- Blob.hpp
- Buf.hpp
- C25519.hpp
- Capability.hpp
- CertificateOfMembership.hpp
- CertificateOfOwnership.hpp
- Constants.hpp
- Containers.hpp
- Credential.hpp
- Defragmenter.hpp
- Dictionary.hpp
- ECC384.hpp
- EphemeralKey.hpp
- Expect.hpp
- FCV.hpp
- Fingerprint.hpp
- IdentificationCertificate.hpp
- Identity.hpp
- InetAddress.hpp
- Locator.hpp
- LZ4.hpp
- MAC.hpp
- Membership.hpp
- MulticastGroup.hpp
- Mutex.hpp
- Network.hpp
- NetworkConfig.hpp
- Node.hpp
- OS.hpp
- Path.hpp
- Peer.hpp
- Poly1305.hpp
- Protocol.hpp
- RuntimeEnvironment.hpp
- Salsa20.hpp
- ScopedPtr.hpp
- SelfAwareness.hpp
- SHA512.hpp
- SharedPtr.hpp
- SymmetricKey.hpp
- Tag.hpp
- Topology.hpp
- Trace.hpp
- TriviallyCopyable.hpp
- Utils.hpp
- VL1.hpp
- VL2.hpp
- )
- set(core_src
- AES.cpp
- Buf.cpp
- C25519.cpp
- Capability.cpp
- CertificateOfMembership.cpp
- CertificateOfOwnership.cpp
- Credential.cpp
- Dictionary.cpp
- ECC384.cpp
- Endpoint.cpp
- IdentificationCertificate.cpp
- Identity.cpp
- InetAddress.cpp
- Locator.cpp
- LZ4.cpp
- Membership.cpp
- Network.cpp
- NetworkConfig.cpp
- Node.cpp
- Path.cpp
- Peer.cpp
- Poly1305.cpp
- Revocation.cpp
- Salsa20.cpp
- SelfAwareness.cpp
- SHA512.cpp
- Tag.cpp
- Topology.cpp
- Trace.cpp
- Utils.cpp
- VL1.cpp
- VL2.cpp
- )
- add_library(${PROJECT_NAME} STATIC ${core_src} ${core_headers})
- target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)
- target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_BINARY_DIR})
- if(WIN32)
- set(libs ${libs} wsock32 ws2_32 rpcrt4 iphlpapi)
- else(WIN32)
- set(libs ${libs} pthread)
- endif(WIN32)
- add_executable(zt_core_tests Tests.h Tests.cpp)
- target_compile_definitions(zt_core_tests PRIVATE ZT_ENABLE_TESTS=1 ZT_STANDALONE_TESTS=1)
- target_include_directories(
- ${PROJECT_NAME}
- PUBLIC
- ${CMAKE_BINARY_DIR}/core
- )
- target_link_libraries(zt_core_tests zt_core ${libs})
|