diff --git a/cmake/Findphobos.cmake b/cmake/Findphobos.cmake index 5f1ede791e6aaea66da6df4ef9296a75f946fffd..3db7d35518424391c68f2b45fce3e128a02c2d98 100644 --- a/cmake/Findphobos.cmake +++ b/cmake/Findphobos.cmake @@ -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" ) diff --git a/cmake/Findspdlog.cmake b/cmake/Findspdlog.cmake index 66bb445863fd7e5326c53b0825ede34314f3d756..49f97ccb36d3cd4e176d742cc5e99cd47c0f35f9 100644 --- a/cmake/Findspdlog.cmake +++ b/cmake/Findspdlog.cmake @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5f6291f4a95341703c5655ab4b0919648b699541..000bf107ff43f61d8bec8bf48833699a3ddfa1d4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 9cbe5bcdb58747c674451f27fc0469a3ff5ca0b3..f90091824ae9d5f1c837a5dc890058475c8a4e29 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -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) diff --git a/src/server/s3_utilities/CMakeLists.txt b/src/server/s3_utilities/CMakeLists.txt index a93bb1d6690ee9907c4a337b4d0d07424f7af990..3e2dc61c98447e9a6b6a11403fdca922a0739558 100644 --- a/src/server/s3_utilities/CMakeLists.txt +++ b/src/server/s3_utilities/CMakeLists.txt @@ -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) diff --git a/src/storage/CMakeLists.txt b/src/storage/CMakeLists.txt index 6c60350c9857f8b0f84c24e82bbfebf01446f40f..e717c4a4757dbe714b1eb78cfdc22e7ea403cd01 100644 --- a/src/storage/CMakeLists.txt +++ b/src/storage/CMakeLists.txt @@ -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) diff --git a/src/stream/CMakeLists.txt b/src/stream/CMakeLists.txt index 026b1d240d6cfc672ffa5c88c01018a8944da7ce..6d90d52484e15f7dbdf86183a74c034af7f5cf0e 100644 --- a/src/stream/CMakeLists.txt +++ b/src/stream/CMakeLists.txt @@ -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)