Skip to content

Commit

Permalink
[irods#6256] CMake: use find_package for spdlog
Browse files Browse the repository at this point in the history
  • Loading branch information
SwooshyCueb authored and alanking committed Feb 20, 2024
1 parent b32b11b commit 0ed7590
Show file tree
Hide file tree
Showing 22 changed files with 5 additions and 23 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ endif()
find_package(nlohmann_json "3.6.1" REQUIRED)
find_package(fmt "8.1.1" REQUIRED
HINTS "${IRODS_EXTERNALS_FULLPATH_FMT}")
find_package(spdlog "1.9.2" REQUIRED
HINTS "${IRODS_EXTERNALS_FULLPATH_SPDLOG}")


if (NOT DEFINED THREADS_PREFER_PTHREAD_FLAG)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
Expand Down
4 changes: 2 additions & 2 deletions lib/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ target_link_libraries(
PUBLIC
nlohmann_json::nlohmann_json
fmt::fmt
spdlog::spdlog_header_only
Threads::Threads
)
target_include_directories(
Expand All @@ -95,7 +96,6 @@ target_include_directories(
"$<BUILD_INTERFACE:${CMAKE_IRODS_SOURCE_DIR}/server/icat/include>"
PRIVATE
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_common_core
Expand Down Expand Up @@ -236,6 +236,7 @@ foreach(variant IN ITEMS client server)
PUBLIC
nlohmann_json::nlohmann_json
fmt::fmt
spdlog::spdlog_header_only
OpenSSL::Crypto
OpenSSL::SSL
)
Expand All @@ -256,7 +257,6 @@ foreach(variant IN ITEMS client server)
"$<BUILD_INTERFACE:${CMAKE_IRODS_SOURCE_DIR}/server/drivers/include>"
PRIVATE
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_lib_core_${variant}
Expand Down
1 change: 0 additions & 1 deletion plugins/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ foreach(plugin IN LISTS IRODS_API_PLUGINS)
"${IRODS_EXTERNALS_FULLPATH_ARCHIVE}/include"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/auth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ foreach(plugin IN LISTS IRODS_AUTH_PLUGINS)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_IRODS_SOURCE_DIR}/server/api/include>"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/auth_legacy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ foreach(plugin IN LISTS IRODS_AUTH_LEGACY_PLUGINS)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_IRODS_SOURCE_DIR}/server/api/include>"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/database/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ foreach(plugin IN LISTS IRODS_DATABASE_PLUGINS)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/experimental/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ foreach(plugin IN LISTS IRODS_EXPERIMENTAL_API_PLUGINS)
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"${IRODS_EXTERNALS_FULLPATH_ARCHIVE}/include"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/microservices/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ foreach(plugin IN LISTS IRODS_MICROSERVICE_PLUGINS)
${plugin_target}
PRIVATE
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/network/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ foreach(plugin IN LISTS IRODS_NETWORK_PLUGINS)
${plugin_target}
PRIVATE
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/resources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ foreach(plugin IN LISTS IRODS_RESOURCE_PLUGINS)
PRIVATE
"${IRODS_EXTERNALS_FULLPATH_ARCHIVE}/include"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/resources/replication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ target_include_directories(
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"${IRODS_EXTERNALS_FULLPATH_ARCHIVE}/include"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_resource_plugin-replication
Expand Down
2 changes: 0 additions & 2 deletions plugins/resources/unixfilesystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ target_include_directories(
irods_resource_plugin_obj-unixfilesystem
PUBLIC
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
)
target_compile_definitions(
Expand Down Expand Up @@ -55,7 +54,6 @@ target_include_directories(
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"${IRODS_EXTERNALS_FULLPATH_ARCHIVE}/include"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_resource_plugin-unixfilesystem
Expand Down
1 change: 0 additions & 1 deletion plugins/rule_engines/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ foreach(plugin IN LISTS IRODS_RULE_ENGINE_PLUGINS)
#"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/irods_rule_language/include>"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
${plugin_target}
Expand Down
1 change: 0 additions & 1 deletion plugins/rule_engines/irods_rule_language/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ target_include_directories(
#"$<BUILD_INTERFACE:${CMAKE_IRODS_SOURCE_DIR}/plugins/rule_engines/include>"
"$<BUILD_INTERFACE:${CMAKE_IRODS_SOURCE_DIR}/server/main_server/include>"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_rule_engine_plugin-irods_rule_language
Expand Down
1 change: 0 additions & 1 deletion server/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ target_include_directories(
"${IRODS_EXTERNALS_FULLPATH_CPPZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_ZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_server_api
Expand Down
1 change: 0 additions & 1 deletion server/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ target_include_directories(
"${IRODS_EXTERNALS_FULLPATH_CPPZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_ZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_server_core
Expand Down
1 change: 0 additions & 1 deletion server/delay_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ target_include_directories(
PRIVATE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irodsDelayServer
Expand Down
1 change: 0 additions & 1 deletion server/drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ target_include_directories(
"${IRODS_EXTERNALS_FULLPATH_CPPZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_ZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_server_drivers
Expand Down
1 change: 0 additions & 1 deletion server/harness/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ foreach(harness IN ITEMS api configuration)
irods_${harness}_test_harness
PRIVATE
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_${harness}_test_harness
Expand Down
1 change: 0 additions & 1 deletion server/icat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ target_include_directories(
"${IRODS_EXTERNALS_FULLPATH_CPPZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_ZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_server_icat
Expand Down
1 change: 0 additions & 1 deletion server/main_server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ target_include_directories(
"${IRODS_EXTERNALS_FULLPATH_BOOST}/include"
"${IRODS_EXTERNALS_FULLPATH_CPPZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_ZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irodsServer
Expand Down
1 change: 0 additions & 1 deletion server/re/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ target_include_directories(
"${IRODS_EXTERNALS_FULLPATH_CPPZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_NANODBC}/include"
"${IRODS_EXTERNALS_FULLPATH_ZMQ}/include"
"${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include"
)
target_compile_definitions(
irods_server_re
Expand Down

0 comments on commit 0ed7590

Please sign in to comment.