mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2026-09-22 15:29:03 -07:00
Update central controller build to use CMake + conda
Muuuuch easier to use external dependencies now Also tried out conan and vcpkg. Ran into dependency issues when solving for packages to install with conan. vcpkg is just obtuse as all hell to install and not easy to integrate
This commit is contained in:
@@ -141,3 +141,4 @@ snap/.snapcraft
|
||||
tcp-proxy/tcp-proxy
|
||||
rustybits/target
|
||||
ext/installfiles/windows/*.back*.aip
|
||||
build/
|
||||
+127
-6
@@ -1,12 +1,133 @@
|
||||
# CMake build script for libzerotiercore.a
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project (zerotiercore)
|
||||
cmake_minimum_required (VERSION 3.13)
|
||||
project (zerotier-one LANGUAGES CXX C)
|
||||
|
||||
option(ZT1_CENTRAL_CONTROLLER "Build with ZeroTier Central Controller support" OFF)
|
||||
|
||||
set (PROJ_DIR ${PROJECT_SOURCE_DIR})
|
||||
set (ZT_DEFS -std=c++11)
|
||||
|
||||
file(GLOB core_src_glob ${PROJ_DIR}/node/*.cpp)
|
||||
add_library(zerotiercore STATIC ${core_src_glob})
|
||||
execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE CPU_ARCHITECTURE)
|
||||
set(CPU_ARCHITECTURE ${CPU_ARCHITECTURE} CACHE STRING "Target CPU architecture (detected automatically)")
|
||||
message(STATUS "Detected CPU architecture: ${CPU_ARCHITECTURE}")
|
||||
if(CPU_ARCHITECTURE STREQUAL "x86_64")
|
||||
add_definitions(
|
||||
-DZT_ARCHITECTURE=2
|
||||
-DZT_USE_X64_ASM_SALSA=1
|
||||
-DZT_USE_X64_ASM_ED25519=1
|
||||
-DZT_SSO_SUPPORTED=1
|
||||
-DZT_USE_X64_ASM_SALSA2012=1
|
||||
-DZT_USE_FAST_X64_ED25519=1
|
||||
)
|
||||
elseif(CPU_ARCHITECTURE STREQUAL "aarch64")
|
||||
add_definitions(-DZT_ARCHITECTURE=4 -DZT_U-DZT_ARCH_ARM_HAS_NEON=1 -DZT_SSO_SUPPORTED=1)
|
||||
add_compile_options(-march=armv8-a+crypto -mtune=generic -mstrict-align)
|
||||
endif()
|
||||
|
||||
target_compile_options(zerotiercore PRIVATE ${ZT_DEFS})
|
||||
include(FetchContent)
|
||||
include(ExternalProject)
|
||||
|
||||
add_definitions(-DCMAKE_BUILD)
|
||||
|
||||
find_package(OpenSSL REQUIRED)
|
||||
find_package(nlohmann_json REQUIRED)
|
||||
find_package(inja REQUIRED)
|
||||
|
||||
set(CMAKE_THREDAD_PREFER_PTHREAD TRUE CACHE INTERNAL "Use pthreads" FORCE)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG TRUE CACHE INTERNAL "Use pthreads" FORCE)
|
||||
find_package(Threads REQUIRED)
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||
endif()
|
||||
|
||||
if(ZT1_CENTRAL_CONTROLLER)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
find_package(opentelemetry-cpp REQUIRED COMPONENTS api sdk)
|
||||
find_package(google_cloud_cpp_bigtable REQUIRED)
|
||||
find_package(google_cloud_cpp_pubsub REQUIRED)
|
||||
else()
|
||||
find_package(opentelemetry-cpp REQUIRED COMPONENTS api)
|
||||
endif()
|
||||
|
||||
if(ZT1_CENTRAL_CONTROLLER)
|
||||
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to" FORCE)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True CACHE BOOL "C++ standard required" FORCE)
|
||||
set(CMAKE_CXX_EXTENSIONS ON CACHE BOOL "Enable compiler-specific extensions" FORCE)
|
||||
add_definitions(-DZT_CONTROLLER_USE_LIBPQ)
|
||||
set(CONTROLLER_RUST_FEATURES ztcontroller)
|
||||
set(RUST_BUILD_COMMAND cargo build --release -F ${CONTROLLER_RUST_FEATURES})
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to conform to")
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED True CACHE BOOL "C++ standard required")
|
||||
set(CMAKE_CXX_EXTENSIONS ON CACHE BOOL "Enable compiler-specific extensions")
|
||||
set(RUST_BUILD_COMMAND "cargo build --release")
|
||||
endif()
|
||||
|
||||
# build rustybits
|
||||
ExternalProject_Add(
|
||||
rustybits_build
|
||||
DOWNLOAD_COMMAND ""
|
||||
CONFIGURE_COMMAND ""
|
||||
# PREFIX ${PROJ_DIR}/rustybits
|
||||
BUILD_COMMAND cd ${PROJ_DIR}/rustybits && ${RUST_BUILD_COMMAND}
|
||||
INSTALL_COMMAND ""
|
||||
BUILD_BYPRODUCTS ${PROJ_DIR}/rustybits/target/release/librustybits.a ${PROJ_DIR}/rustybits/target/rustybits.h
|
||||
)
|
||||
set(RUSTYBITS_LIB ${PROJ_DIR}/rustybits/target/release/librustybits.a)
|
||||
set(RUSTYBITS_INCLUDE_DIR ${PROJ_DIR}/rustybits/target)
|
||||
add_library(rustybits STATIC IMPORTED GLOBAL)
|
||||
set_property(TARGET rustybits PROPERTY IMPORTED_LOCATION ${RUSTYBITS_LIB})
|
||||
add_dependencies(rustybits rustybits_build)
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack")
|
||||
# Get & build dependencies not in conda
|
||||
include (cmake/cpp-httplib.cmake)
|
||||
include (cmake/redis-plus-plus.cmake)
|
||||
include (cmake/miniupnpc.cmake)
|
||||
|
||||
add_subdirectory(ext)
|
||||
add_subdirectory(node)
|
||||
add_subdirectory(osdep)
|
||||
add_subdirectory(service)
|
||||
add_subdirectory(controller)
|
||||
|
||||
set(LINKED_LIBRARIES
|
||||
prometheus-cpp-lite
|
||||
zerotier-service
|
||||
zerotier-osdep
|
||||
zerotier-core
|
||||
zerotier-controller
|
||||
Threads::Threads
|
||||
nlohmann_json::nlohmann_json
|
||||
opentelemetry-cpp::api
|
||||
rustybits
|
||||
OpenSSL::Crypto
|
||||
OpenSSL::SSL
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
if(ZT1_CENTRAL_CONTROLLER)
|
||||
list(APPEND LINKED_LIBRARIES
|
||||
opentelemetry-cpp::sdk)
|
||||
endif()
|
||||
|
||||
|
||||
add_executable(zerotier-one
|
||||
one.cpp
|
||||
ext/http-parser/http_parser.c)
|
||||
|
||||
target_link_libraries(zerotier-one
|
||||
${LINKED_LIBRARIES}
|
||||
)
|
||||
|
||||
add_executable(zerotier-selftest
|
||||
selftest.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(zerotier-selftest
|
||||
zerotier-core
|
||||
Threads::Threads
|
||||
nlohmann_json::nlohmann_json
|
||||
prometheus-cpp-lite
|
||||
Threads::Threads)
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DZT1_CENTRAL_CONTROLLER=1 -DCMAKE_INSTALL_PREFIX=$PWD -S . -B build/ -DCMAKE_INSTALL_PREFIX=$(shell pwd)/build-out
|
||||
cmake --build build/ --target all -j4 --verbose
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
ARCH="amd64"
|
||||
elif [ "$ARCH" = "aarch64" ]; then
|
||||
ARCH="arm64"
|
||||
fi
|
||||
|
||||
if [ -z "$TARGET_DOCKER_REPO" ]; then
|
||||
TARGET_DOCKER_REPO="us-central1-docker.pkg.dev/zerotier-421eb9/docker-images"
|
||||
fi
|
||||
|
||||
docker build -platform linux/$ARCH -t $TARGET_DOCKER_REPO/ztcentral-controller:$(git rev-parse --short HEAD)-$ARCH -f ext/central-controller/docker/Dockerfile.central-controller . --load --push
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
set(FETCHCONTENT_QUIET OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
cpp-httplib
|
||||
GIT_REPOSITORY https://github.com/yhirose/cpp-httplib.git
|
||||
GIT_TAG v0.25.0
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
|
||||
set(HTTPLIB_COMPILE OFF CACHE INTERNAL "")
|
||||
set(HTTPLIB_USE_ZLIB_IF_AVAILABLE ON CACHE INTERNAL "Use zlib if available")
|
||||
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE ON CACHE INTERNAL "Use brotli if available")
|
||||
set(HTTPLIB_USE_OPENSSL_IF_AVAILABLE ON CACHE INTERNAL "Use OpenSSL if available")
|
||||
set(HTTPLIB_USE_ZSTD_IF_AVAILABLE ON CACHE INTERNAL "Use zstd if available")
|
||||
FetchContent_MakeAvailable(cpp-httplib)
|
||||
|
||||
if (NOT TARGET httplib::httplib)
|
||||
message(FATAL_ERROR "A required cpp-httplib target (cpp-httplib) was not imported")
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
set(FETCHCONTENT_QUIET OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
miniupnpc
|
||||
URL https://github.com/miniupnp/miniupnp/releases/download/miniupnpc_2_3_3/miniupnpc-2.3.3.tar.gz
|
||||
DOWNLOAD_EXTRACT_TIMESTAMP TRUE
|
||||
)
|
||||
set(UPNPC_BUILD_TESTS FALSE CACHE INTERNAL "Build tests" FORCE)
|
||||
set(UPNPC_BUILD_SHARED FALSE CACHE INTERNAL "Build shared library" FORCE)
|
||||
set(UPNPC_BUILD_STATIC TRUE CACHE INTERNAL "Build static library" FORCE)
|
||||
set(UPNPC_BUILD_SAMPLE FALSE CACHE INTERNAL "Build sample" FORCE)
|
||||
|
||||
FetchContent_MakeAvailable(miniupnpc)
|
||||
|
||||
if (NOT TARGET miniupnpc::miniupnpc)
|
||||
message(FATAL_ERROR "A required miniupnpc target (miniupnpc::miniupnpc) was not imported")
|
||||
endif()
|
||||
add_definitions(-DZT_USE_MINIUPNPC)
|
||||
|
||||
FetchContent_Declare(
|
||||
libnatpmp
|
||||
GIT_REPOSITORY https://github.com/miniupnp/libnatpmp.git
|
||||
GIT_TAG master
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
FetchContent_MakeAvailable(libnatpmp)
|
||||
|
||||
if (NOT TARGET natpmp)
|
||||
message(FATAL_ERROR "A required libnatpmp target (natpmp) was not imported")
|
||||
endif()
|
||||
@@ -0,0 +1,19 @@
|
||||
set(FETCHCONTENT_QUIET OFF)
|
||||
|
||||
FetchContent_Declare(
|
||||
redis-plus-plus
|
||||
GIT_REPOSITORY https://github.com/sewenew/redis-plus-plus.git
|
||||
GIT_TAG 1.3.15
|
||||
GIT_SHALLOW ON
|
||||
)
|
||||
set(REDIS_PLUS_PLUS_BUILD_STATIC ON CACHE INTERNAL "Build static library" FORCE)
|
||||
set(REDIS_PLUS_PLUS_BUILD_SHARED ON CACHE INTERNAL "Build shared library" FORCE)
|
||||
set(REDIS_PLUS_PLUS_BUILD_TEST OFF CACHE INTERNAL "Build tests" FORCE)
|
||||
set(REDIS_PLUS_PLUS_BUILD_STATIC_WITH_PIC ON CACHE INTERNAL "Build static library with PIC" FORCE)
|
||||
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "Build shared libraries" FORCE)
|
||||
|
||||
FetchContent_MakeAvailable(redis-plus-plus)
|
||||
if(NOT TARGET redis++::redis++_static)
|
||||
message(FATAL_ERROR "A required redis-plus-plus target (redis++::redis++) was not imported")
|
||||
endif()
|
||||
message(STATUS "redis-plus-plus imported")
|
||||
@@ -0,0 +1,75 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(zerotier-controller)
|
||||
|
||||
|
||||
set(SRC_FILES
|
||||
DB.cpp
|
||||
DB.hpp
|
||||
DBMirrorSet.cpp
|
||||
DBMirrorSet.hpp
|
||||
EmbeddedNetworkController.cpp
|
||||
EmbeddedNetworkController.hpp
|
||||
FileDB.cpp
|
||||
FileDB.hpp
|
||||
LFDB.cpp
|
||||
LFDB.hpp
|
||||
CtlUtil.cpp
|
||||
CtlUtil.hpp
|
||||
)
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
"${httplib_SOURCE_DIR}"
|
||||
${RUSTYBITS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(LINK_LIBS
|
||||
zerotier-osdep
|
||||
nlohmann_json::nlohmann_json
|
||||
opentelemetry-cpp::api
|
||||
rustybits
|
||||
Threads::Threads
|
||||
prometheus-cpp-lite
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
if (ZT1_CENTRAL_CONTROLLER)
|
||||
find_package(PostgreSQL REQUIRED)
|
||||
|
||||
list(APPEND SRC_FILES
|
||||
CV1.cpp
|
||||
CV1.hpp
|
||||
CV2.cpp
|
||||
CV2.hpp
|
||||
CentralDB.cpp
|
||||
CentralDB.hpp
|
||||
NotificationListener.hpp
|
||||
PostgreSQL.cpp
|
||||
PostgreSQL.hpp
|
||||
PubSubListener.cpp
|
||||
PubSubListener.hpp
|
||||
Redis.hpp
|
||||
RedisListener.cpp
|
||||
RedisListener.hpp)
|
||||
|
||||
list(APPEND INCLUDE_DIRS
|
||||
${PostgreSQL_INCLUDE_DIRS}
|
||||
"${redis++_BUILD_DIR}/src"
|
||||
${pqxx_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
list(APPEND LINK_LIBS
|
||||
redis++::redis++_static
|
||||
pqxx
|
||||
${PostgreSQL_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(zerotier-controller STATIC ${SRC_FILES})
|
||||
|
||||
target_include_directories(zerotier-controller PRIVATE ${INCLUDE_DIRS})
|
||||
|
||||
add_dependencies(zerotier-controller redis++::redis++)
|
||||
|
||||
target_link_libraries(zerotier-controller
|
||||
${LINK_LIBS}
|
||||
)
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <pqxx/pqxx>
|
||||
#include <redis++/redis++.h>
|
||||
#include <sw/redis++/redis++.h>
|
||||
|
||||
namespace rustybits {
|
||||
struct SmeeClient;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <pqxx/pqxx>
|
||||
#include <redis++/redis++.h>
|
||||
#include <sw/redis++/redis++.h>
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <pqxx/pqxx>
|
||||
#include <redis++/redis++.h>
|
||||
#include <sw/redis++/redis++.h>
|
||||
|
||||
namespace rustybits {
|
||||
struct SmeeClient;
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
#include "DBMirrorSet.hpp"
|
||||
|
||||
#include <atomic>
|
||||
#ifdef CMAKE_BUILD
|
||||
#include <httplib.h>
|
||||
#else
|
||||
#include <cpp-httplib/httplib.h>
|
||||
#endif
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
|
||||
#include "LFDB.hpp"
|
||||
|
||||
#ifdef CMAKE_BUILD
|
||||
#include "httplib.h"
|
||||
#else
|
||||
#include "../ext/cpp-httplib/httplib.h"
|
||||
#endif
|
||||
#include "../osdep/OSUtils.hpp"
|
||||
|
||||
#include <chrono>
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
# Central Controller Builds
|
||||
|
||||
NOTE: for ZeroTier, Inc Internal use only. We do not support these builds for external use, nor do we guarantee this will work for anyone but us.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
`cmake` is used for builds and `conda` is used to manage external dependencies.
|
||||
|
||||
First, install `conda`:
|
||||
|
||||
```bash
|
||||
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh
|
||||
bash /tmp/miniconda.sh -b -u -p $HOME/miniconda3
|
||||
```
|
||||
|
||||
Initialize conda:
|
||||
|
||||
```bash
|
||||
source ~/miniconda3/bin/activate
|
||||
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
|
||||
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
|
||||
conda config --set channel_priority strict
|
||||
```
|
||||
|
||||
Install external dependencies:
|
||||
|
||||
```bash
|
||||
conda install -y -c conda-forge \
|
||||
conda-forge::cmake \
|
||||
conda-forge::git \
|
||||
conda-forge::cxx-compiler \
|
||||
conda-forge::c-compiler \
|
||||
conda-forge::make \
|
||||
conda-forge::pkg-config \
|
||||
conda-forge::libpqxx=7.7.3 \
|
||||
conda-forge::libopentelemetry-cpp=1.21.0 \
|
||||
conda-forge::libopentelemetry-cpp-headers=1.21.0 \
|
||||
conda-forge::google-cloud-cpp=2.39.0 \
|
||||
conda-forge::libgoogle-cloud=2.39.0 \
|
||||
conda-forge::rust=1.89.0 \
|
||||
conda-forge::inja=3.3.0 \
|
||||
conda-forge::libhiredis=1.3.0 \
|
||||
conda-forge::nlohmann_json=3.12.0
|
||||
```
|
||||
|
||||
## Build the Central Controller Binary
|
||||
|
||||
|
||||
```bash
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DZT1_CENTRAL_CONTROLLER=1 -DCMAKE_INSTALL_PREFIX=$PWD/out -S . -B build/ -DCMAKE_INSTALL_PREFIX=$(shell pwd)/build-out
|
||||
cmake --build build/ --target all -j8 --verbose
|
||||
```
|
||||
|
||||
## Packaging via Docker
|
||||
|
||||
TODO: write me
|
||||
@@ -8,8 +8,8 @@
|
||||
#include "Redis.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <redis++/redis++.h>
|
||||
#include <string>
|
||||
#include <sw/redis++/redis++.h>
|
||||
#include <thread>
|
||||
|
||||
namespace ZeroTier {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(ext)
|
||||
|
||||
file(GLOB_RECURSE PROM_CORE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/prometheus-cpp-lite-1.0/core/include/*.h )
|
||||
set(PROMETHEUS_CPP_LITE_HEADERS ${PROM_CORE_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/prometheus-cpp-lite-1.0/simpleapi/include)
|
||||
|
||||
|
||||
add_library(prometheus-cpp-lite INTERFACE)
|
||||
target_sources(prometheus-cpp-lite INTERFACE ${PROMETHEUS_CPP_LITE_HEADERS})
|
||||
target_include_directories(prometheus-cpp-lite INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/prometheus-cpp-lite-1.0/simpleapi/include ${CMAKE_CURRENT_SOURCE_DIR}/prometheus-cpp-lite-1.0/core/include)
|
||||
add_custom_target(prometheus-cpp-lite-ide SOURCES ${PROMETHEUS_CPP_LITE_HEADERS})
|
||||
set(prometheus-cpp-lite_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/prometheus-cpp-lite-1.0/simpleapi/include ${CMAKE_CURRENT_SOURCE_DIR}/prometheus-cpp-lite-1.0/core/include PARENT_SCOPE)
|
||||
@@ -0,0 +1,23 @@
|
||||
FROM continuumio/miniconda3:25.3.1-1
|
||||
|
||||
LABEL maintainer="ZeroTier Inc."
|
||||
|
||||
RUN conda config --set channel_priority strict && \
|
||||
conda install -y -c conda-forge \
|
||||
conda-forge::cmake=3.25.1 \
|
||||
conda-forge::git \
|
||||
conda-forge::cxx-compiler \
|
||||
conda-forge::c-compiler \
|
||||
conda-forge::make \
|
||||
conda-forge::pkg-config \
|
||||
conda-forge::libpqxx=7.7.3 \
|
||||
conda-forge::libopentelemetry-cpp=1.21.0 \
|
||||
conda-forge::libopentelemetry-cpp-headers=1.21.0 \
|
||||
conda-forge::google-cloud-cpp=2.39.0 \
|
||||
conda-forge::libgoogle-cloud=2.39.0 \
|
||||
conda-forge::rust=1.89.0 \
|
||||
conda-forge::inja=3.3.0 \
|
||||
conda-forge::libhiredis=1.3.0 \
|
||||
conda-forge::nlohmann_json=3.12.0
|
||||
|
||||
# ADD . /src
|
||||
@@ -5,7 +5,7 @@
|
||||
# Distributed under the MIT License.
|
||||
# (See accompanying file LICENSE or copy at https://mit-license.org/)
|
||||
|
||||
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
project(http-client-lite)
|
||||
|
||||
## Set output binary
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project(prometheus-cpp-lite-core)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
file(GLOB_RECURSE PROMETHEUS_CPP_LITE_HEADERS *.h)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project(prometheus-cpp-simpleapi)
|
||||
cmake_minimum_required(VERSION 3.2)
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
add_library (${PROJECT_NAME} STATIC "./src/simpleapi.cpp" )
|
||||
target_sources (${PROJECT_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/prometheus/simpleapi.h")
|
||||
|
||||
+1
-1
@@ -344,7 +344,7 @@ ifeq ($(ZT_CONTROLLER),1)
|
||||
override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||
override LDLIBS+=-Lext/libpqxx-7.7.3/install/ubuntu22.04/$(EXT_ARCH)/lib -lpqxx -lpq ext/hiredis-1.0.2/lib/ubuntu22.04/$(EXT_ARCH)/libhiredis.a ext/redis-plus-plus-1.3.3/install/ubuntu22.04/$(EXT_ARCH)/lib/libredis++.a -lssl -lcrypto
|
||||
override DEFS+=-DZT_CONTROLLER_USE_LIBPQ -DZT_NO_PEER_METRICS -DZT_OPENTELEMETRY_ENABLED
|
||||
override INCLUDES+=-I/usr/include/postgresql -Iext/libpqxx-7.7.3/install/ubuntu22.04/$(EXT_ARCH)/include -Iext/hiredis-1.0.2/include/ -Iext/redis-plus-plus-1.3.3/install/ubuntu22.04/$(EXT_ARCH)/include/sw/
|
||||
override INCLUDES+=-I/usr/include/postgresql -Iext/libpqxx-7.7.3/install/ubuntu22.04/$(EXT_ARCH)/include -Iext/hiredis-1.0.2/include/ -Iext/redis-plus-plus-1.3.3/install/ubuntu22.04/$(EXT_ARCH)/include
|
||||
override ZT_CARGO_FLAGS+=-F ztcontroller
|
||||
ifeq ($(ZT_DEBUG),1)
|
||||
override LDLIBS+=rustybits/target/debug/librustybits.a
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user