This commit is contained in:
stephb9959
2021-02-11 15:38:29 -08:00
parent 8086b4319f
commit 89216c2fd1

View File

@@ -1,21 +1,22 @@
cmake_minimum_required(VERSION 3.17)
project(ucentral)
if(NOT TARGET spdlog)
# Stand-alone build
find_package(spdlog REQUIRED)
endif()
if(EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
else()
message(WARNING "The file conanbuildinfo.cmake doesn't exist, you have to run conan install first")
endif()
set(CMAKE_CXX_STANDARD 20)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(cpprestsdk REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread system)
find_package(OpenSSL REQUIRED)
include_directories(/usr/local/include /usr/local/opt/openssl/include)
# link_directories(/usr/local/lib /usr/local/opt/openssl/lib)
add_executable(ucentral main.cpp)
target_link_libraries(ucentral ${CONAN_LIBS})
### target_link_libraries(ucentral PRIVATE spdlog::spdlog_header_only)
target_link_libraries(ucentral PRIVATE cpprestsdk::cpprest ${Boost_LIBRARIES})