fix ASIO and cxxopts libraries compile/link errors
This commit is contained in:
parent
cb362c6e49
commit
a1fa54c636
@ -43,15 +43,18 @@ else()
|
||||
include(ExternalProject)
|
||||
|
||||
FetchContent_Declare(cxxopts_lib
|
||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/cxxopts_lib
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}
|
||||
GIT_REPOSITORY "https://github.com/jarro2783/cxxopts.git"
|
||||
GIT_TAG "v3.3.1"
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_SUBMODULES ""
|
||||
GIT_PROGRESS TRUE
|
||||
PREFIX ${CMAKE_BINARY_DIR}/cxxopts_lib
|
||||
# SOURCE_DIR ${CMAKE_BINARY_DIR}/cxxopts_lib
|
||||
# BINARY_DIR ${CMAKE_BINARY_DIR}
|
||||
GIT_REPOSITORY "https://github.com/jarro2783/cxxopts.git"
|
||||
GIT_TAG "v3.3.1"
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_SUBMODULES ""
|
||||
GIT_PROGRESS TRUE
|
||||
OVERRIDE_FIND_PACKAGE
|
||||
)
|
||||
FetchContent_MakeAvailable(cxxopts_lib)
|
||||
find_package(cxxopts CONFIG)
|
||||
endif()
|
||||
|
||||
set(ASIBFM700_LIB_SRC asibfm700_common.h asibfm700_servocontroller.h asibfm700_servocontroller.cpp)
|
||||
@ -66,12 +69,13 @@ add_library(${ASIBFM700_LIB} STATIC ${ASIBFM700_LIB_SRC}
|
||||
|
||||
target_include_directories(${ASIBFM700_LIB} PUBLIC mcc spdlog ${ERFA_INCLUDE_DIR})
|
||||
# target_link_libraries(${ASIBFM700_LIB} PUBLIC mcc spdlog ${ERFA_LIBFILE})
|
||||
target_link_libraries(${ASIBFM700_LIB} PUBLIC mcc spdlog ERFA_LIB bsplines sidservo)
|
||||
target_link_libraries(${ASIBFM700_LIB} PUBLIC mcc ASIO::ASIO spdlog ERFA_LIB bsplines sidservo)
|
||||
|
||||
|
||||
set(ASIBFM700_NETSERVER_APP asibfm700_netserver)
|
||||
add_executable(${ASIBFM700_NETSERVER_APP} asibfm700_netserver_main.cpp)
|
||||
target_link_libraries(${ASIBFM700_NETSERVER_APP} PRIVATE mcc spdlog ${ASIBFM700_LIB})
|
||||
# target_link_libraries(${ASIBFM700_NETSERVER_APP} PRIVATE mcc spdlog ${ASIBFM700_LIB})
|
||||
target_link_libraries(${ASIBFM700_NETSERVER_APP} PRIVATE cxxopts ${ASIBFM700_LIB})
|
||||
|
||||
option(WITH_TESTS "Build tests" ON)
|
||||
|
||||
|
||||
@ -38,8 +38,6 @@ if (NOT ${spdlog_FOUND})
|
||||
find_package(spdlog CONFIG)
|
||||
endif()
|
||||
|
||||
message(STATUS "-----: " ${spdlog_FOUND})
|
||||
|
||||
# ******* ERFA LIBRARY *******
|
||||
|
||||
ExternalProject_Add(erfalib
|
||||
@ -65,8 +63,6 @@ set(ERFA_INCLUDE_DIR ${CMAKE_BINARY_DIR}/erfa_lib)
|
||||
# set(ERFA_LIBFILE ${CMAKE_BINARY_DIR}/erfa_lib/liberfa.a PARENT_SCOPE)
|
||||
# include_directories(${ERFA_INCLUDE_DIR})
|
||||
|
||||
message(STATUS ${ERFA_INCLUDE_DIR})
|
||||
|
||||
add_subdirectory(bsplines)
|
||||
message(STATUS "BSPLINES_INCLUDE_DIR: " ${BSPLINES_INCLUDE_DIR})
|
||||
include_directories(${BSPLINES_INCLUDE_DIR})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user