...
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
|
||||
set(QT_CREATOR_SKIP_MAINTENANCE_TOOL_PROVIDER ON)
|
||||
|
||||
# ******* MOUNT CONTROL COMPONENTS *******
|
||||
|
||||
project(mcc LANGUAGES C CXX Fortran VERSION 0.1)
|
||||
@@ -48,6 +50,7 @@ if(USE_SPDLOG)
|
||||
|
||||
find_package(spdlog CONFIG)
|
||||
if(NOT ${spdlog_FOUND})
|
||||
message(STATUS "\tfetch spdlog-lib ...")
|
||||
FetchContent_Declare(
|
||||
spdlog
|
||||
GIT_REPOSITORY "https://github.com/gabime/spdlog.git"
|
||||
@@ -59,7 +62,7 @@ if(USE_SPDLOG)
|
||||
"-DSPDLOG_USE_STD_FORMAT=ON -DSPDLOG_FMT_EXTERNAL=OFF"
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
)
|
||||
find_package(spdlog CONFIG)
|
||||
find_package(spdlog REQUIRED CONFIG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -171,7 +174,7 @@ if(USE_ASIO)
|
||||
|
||||
execute_process(
|
||||
WORKING_DIRECTORY ${asiolib_project_SOURCE_DIR}/asio
|
||||
COMMAND ./configure --prefix=${asiolib_project_SOURCE_DIR}
|
||||
COMMAND ./configure --prefix=${asiolib_project_SOURCE_DIR}/asio
|
||||
)
|
||||
|
||||
set(ENV{PKG_CONFIG_PATH} "${asiolib_project_SOURCE_DIR}/asio")
|
||||
@@ -250,6 +253,10 @@ if(USE_ASIO)
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE PkgConfig::ASIOLIB)
|
||||
endif()
|
||||
|
||||
if(USE_SPDLOG)
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE spdlog::spdlog)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTS)
|
||||
add_executable(mcc_telemetry_test tests/mcc_telemetry_test.cpp)
|
||||
target_link_libraries(mcc_telemetry_test PRIVATE ${PROJECT_NAME})
|
||||
|
||||
Reference in New Issue
Block a user