Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ if(${NO_EVENTFD})
endif()

# Check packages
find_package(CURL 7.29 REQUIRED)
find_package(fmt REQUIRED)
find_package(OpenSSL 1.0.0 REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(spdlog REQUIRED)
find_package(Threads REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(OpenMP)
find_package(IBVerbs)
find_package(RDMACM)
Expand All @@ -96,7 +101,6 @@ if(NOT PASTE)
message(SEND_ERROR "GNU paste is missing. Please install coreutils")
endif()


set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig")

pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.13)
Expand Down Expand Up @@ -171,9 +175,10 @@ else()
endif()

# Build options
cmake_dependent_option(WITHOUT_GPL "Build VILLASnode without any GPL code" OFF "" ON)
option(LOG_COLOR_DISABLE "Disable any colored log output" OFF)
option(WITHOUT_GPL "Build VILLASnode without any GPL code" OFF)
option(WITH_DEFAULTS "Defaults for non required build options" ON)
cmake_dependent_option(WITH_GHC_FS "Build using ghc::filesystem, a drop in replacement for std::filesystem" ON "STDCXX_FS_NOT_FOUND" OFF)
cmake_dependent_option(WITH_DEFAULTS "Defaults for non required build options" ON "" OFF)
cmake_dependent_option(WITH_API "Build with remote control API" "${WITH_DEFAULTS}" "" OFF)
cmake_dependent_option(WITH_CLIENTS "Build client applications" "${WITH_DEFAULTS}" "TOPLEVEL_PROJECT" OFF)
cmake_dependent_option(WITH_CONFIG "Build with support for libconfig configuration syntax" "${WITH_DEFAULTS}" "LIBCONFIG_FOUND" OFF)
Expand Down
22 changes: 0 additions & 22 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,11 @@
# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

include(FindPkgConfig)
include(FeatureSummary)
include(GNUInstallDirs)

# Check packages
find_package(OpenSSL 1.0.0 REQUIRED)
find_package(CURL 7.29 REQUIRED)
find_package(spdlog 1.6.0 REQUIRED)
find_package(fmt 6.0.0 REQUIRED)

pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.7)
pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9)
pkg_check_modules(UUID IMPORTED_TARGET REQUIRED uuid>=2.23)

if(fmt_VERSION VERSION_LESS "9.0.0")
message("Using legacy ostream formatting")
set(FMT_LEGACY_OSTREAM_FORMATTER 1)
endif()

add_subdirectory(lib)
if(WITH_TESTS)
add_subdirectory(tests)
endif()

# Disable any colored log output
option(LOG_COLOR_DISABLE "Disable any colored log output" OFF)

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/include/villas/config.hpp.in
${CMAKE_CURRENT_BINARY_DIR}/include/villas/config.hpp
Expand Down
Loading