Commit 3f1f6802 authored by Sophie Wenzel-Teuber's avatar Sophie Wenzel-Teuber
Browse files

Update cmake for use with CentOS 8 rpms

* Update Findspdlog.cmake script to use spdlog's own cmake scripts
* Add linking to spdlog::spdlog to all deimos targets
* Clean up and update Findphobos.cmake
parent 07d5e8ab
Pipeline #3805 failed with stages
in 6 minutes and 29 seconds
......@@ -5,22 +5,16 @@ include(FindPackageHandleStandardArgs)
if(NOT PHOBOS_FOUND)
find_path( PHOBOS_INCLUDE_DIR
HINTS ./
../phobos/include/
../include/phobos/
../../phobos/include/
../../include/phobos/
../../../phobos/include/
../../../include/phobos/
/usr/include/
/usr/include/phobos/
/usr/local/include/
/usr/local/include/phobos/
${CMAKE_PREFIX_PATH}/include/phobos/
${CMAKE_PREFIX_PATH}/phobos/include/
${CMAKE_INSTALL_PREFIX}/../include/phobos/
${CMAKE_INSTALL_PREFIX}/../phobos/include/
${CMAKE_INSTALL_PREFIX}/include/
${CMAKE_INSTALL_PREFIX}/include/phobos/
${CMAKE_INSTALL_PREFIX}/phobos/include/
${CMAKE_INSTALL_PREFIX}/../include/
${CMAKE_INSTALL_PREFIX}/../include/phobos/
${CMAKE_INSTALL_PREFIX}/../phobos/include/
NAMES phobos_store.h pho_attrs.h
DOC "Phobos headers"
)
......@@ -58,23 +52,17 @@ if(NOT PHOBOS_FOUND)
)
find_path( PHOBOS_LIBRARY_DIR
HINTS ./
../phobos/lib/
../lib/phobos/
../../phobos/lib/
../../lib/phobos/
../../../phobos/lib/
../../../lib/phobos/
HINTS ./
/usr/lib/
/usr/lib/phobos/
/usr/lib64/
/usr/local/lib/
/usr/local/lib/phobos/
${CMAKE_PREFIX_PATH}/lib/phobos/
${CMAKE_PREFIX_PATH}/phobos/lib/
${CMAKE_INSTALL_PREFIX}/../lib/phobos/
${CMAKE_INSTALL_PREFIX}/../phobos/lib/
${CMAKE_INSTALL_PREFIX}/lib/phobos/
/usr/local/lib64/
${CMAKE_INSTALL_PREFIX}/lib/
${CMAKE_INSTALL_PREFIX}/lib64/
${CMAKE_INSTALL_PREFIX}/phobos/lib/
${CMAKE_INSTALL_PREFIX}/phobos/lib64/
${CMAKE_INSTALL_PREFIX}/../phobos/lib/
${CMAKE_INSTALL_PREFIX}/../phobos/lib64/
NAMES libphobos_store.so libphobos_store.la
DOC "Phobos library"
)
......
......@@ -3,27 +3,29 @@ include(FindPackageHandleStandardArgs)
# message("Looking for SpdLog")
if(NOT SPDLOG_FOUND)
find_path( SPDLOG_INCLUDE_DIR
find_path( SPDLOG_CONFIG
HINTS ./
./spdlog/include/
../spdlog/include/
../../spdlog/include/
../../../spdlog/include/
/usr/spdlog/include/
/usr/local/include/
/usr/local/spdlog/include/
${CMAKE_PREFIX_PATH}/include/spdlog/include/
${CMAKE_PREFIX_PATH}/spdlog/include/
${CMAKE_INSTALL_PREFIX}/../include/spdlog/include/
${CMAKE_INSTALL_PREFIX}/../spdlog/include/
${CMAKE_INSTALL_PREFIX}/include/spdlog/include/
${CMAKE_INSTALL_PREFIX}/spdlog/include/
NAMES spdlog/spdlog.h
DOC "SpdLog headers"
./spdlog/lib64/cmake/spdlog/
../spdlog/lib64/cmake/spdlog/
../../spdlog/lib64/cmake/spdlog/
../../../spdlog/lib64/cmake/spdlog/
/usr/lib64/cmake/spdlog/
/usr/local/lib64/cmake/spdlog/
${CMAKE_PREFIX_PATH}/lib64/cmake/spdlog/
${CMAKE_PREFIX_PATH}/spdlog/lib64/cmake/spdlog/
${CMAKE_INSTALL_PREFIX}/../lib64/cmake/spdlog/
${CMAKE_INSTALL_PREFIX}/../spdlog/lib64/cmake/spdlog/
${CMAKE_INSTALL_PREFIX}/lib64/cmake/spdlog/
${CMAKE_INSTALL_PREFIX}/spdlog/lib64/cmake/spdlog/
NAMES spdlogConfig.cmake
DOC "SpdLog cmake Config"
)
find_package_handle_standard_args(spdlog
REQUIRED_VARS SPDLOG_INCLUDE_DIR
HANDLE_COMPONENTS)
if(NOT SPDLOG_CONFIG)
MESSAGE(FATAL_ERROR
"Could not find spdlog Cmake config file")
endif()
include(${SPDLOG_CONFIG}/spdlogConfig.cmake)
endif()
\ No newline at end of file
......@@ -20,6 +20,7 @@ target_compile_features(deimos PUBLIC cxx_std_14)
target_link_system_libraries(deimos PUBLIC proxygen::proxygen)
target_link_system_libraries(deimos PUBLIC proxygen::proxygenhttpserver)
target_link_system_libraries(deimos PUBLIC spdlog::spdlog)
target_link_libraries(deimos PUBLIC server)
......
......@@ -22,5 +22,6 @@ endif(NOT DEIMOS_AUTHORISATION)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1")
target_link_system_libraries(server PUBLIC proxygen::proxygen)
target_link_system_libraries(server PUBLIC spdlog::spdlog)
target_link_libraries(server PUBLIC stream)
target_link_libraries(server PUBLIC s3_utilities)
......@@ -8,5 +8,6 @@ add_library(
)
target_link_system_libraries(s3_utilities PUBLIC proxygen::proxygen)
target_link_system_libraries(s3_utilities PUBLIC spdlog::spdlog)
target_link_system_libraries(s3_utilities PUBLIC OpenSSL::Crypto)
......@@ -13,4 +13,5 @@ target_include_directories(
${PHOBOS_INCLUDE_DIR}
)
target_link_system_libraries(storage PUBLIC spdlog::spdlog)
target_link_system_libraries(storage PUBLIC phobos_cpp_wrapper)
......@@ -4,4 +4,5 @@ add_library(
)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -O1")
target_link_system_libraries(stream PUBLIC spdlog::spdlog)
target_link_libraries(stream PUBLIC storage)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment