Skip to content

Commit

Permalink
[91] Restore build compatibility with iRODS 4.3.1 packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn committed Feb 23, 2024
1 parent d7bf6ca commit e695fdb
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 15 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ endif()

set(IRODS_BUILD_WITH_WERROR OFF CACHE BOOL "Choose whether to compile with -Werror.")

if (${IRODS_VERSION} VERSION_GREATER "4.3.1")
find_package(fmt "8.1.1"
HINTS "${IRODS_EXTERNALS_FULLPATH_FMT}")
endif()

find_package(nlohmann_json "3.6.1" REQUIRED)
find_package(fmt "8.1.1"
HINTS "${IRODS_EXTERNALS_FULLPATH_FMT}")
find_package(Threads REQUIRED)
find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL)

Expand Down
47 changes: 40 additions & 7 deletions api_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,26 @@ foreach (IRODS_MODULE_VARIANT IN ITEMS client server)
irods_plugin_dependencies
irods_common
irods_${IRODS_MODULE_VARIANT}
fmt::fmt
${IRODS_EXTERNALS_FULLPATH_NANODBC}/lib/libnanodbc.so)

if (${IRODS_VERSION} VERSION_GREATER "4.3.1")
target_link_libraries(
${IRODS_MODULE_NAME}
PRIVATE
fmt::fmt)
else()
target_include_directories(
${IRODS_MODULE_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/include
${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include)

target_link_libraries(
${IRODS_MODULE_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/lib/libfmt.so)
endif()

add_dependencies(${IRODS_MODULE_NAME} irods_genquery2_parser)

install(
Expand All @@ -63,8 +80,8 @@ target_link_objects(
install(
FILES
"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/plugins/api/genquery2_common.h"
#"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/plugins/api/rc_genquery2.h"
#"${CMAKE_CURRENT_SOURCE_DIR}/include/irods/plugins/api/rs_genquery2.hpp"
# "${CMAKE_CURRENT_SOURCE_DIR}/include/irods/plugins/api/rc_genquery2.h"
# "${CMAKE_CURRENT_SOURCE_DIR}/include/irods/plugins/api/rs_genquery2.hpp"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/irods/plugins/api")

#set(IRODS_PLUGIN_INVOCATION_FUNCTIONS irods_genquery2_invocation_functions)
Expand All @@ -76,16 +93,32 @@ install(
# ${CMAKE_CURRENT_SOURCE_DIR}/src/rs_genquery2.cpp)
#
#target_include_directories(
# ${IRODS_MODULE_NAME}
# ${IRODS_PLUGIN_INVOCATION_FUNCTIONS}
# PRIVATE
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
# ${IRODS_INCLUDE_DIRS}
# #${IRODS_EXTERNALS_FULLPATH_BOOST}/include
# #${IRODS_EXTERNALS_FULLPATH_NANODBC}/include)
# )
#
#target_link_libraries(
# ${IRODS_PLUGIN_INVOCATION_FUNCTIONS}
# PRIVATE
# irods_server
# fmt::fmt)
# irods_server)
#
#if (${IRODS_VERSION} VERSION_GREATER "4.3.1")
# target_link_libraries(
# ${IRODS_PLUGIN_INVOCATION_FUNCTIONS}
# PRIVATE
# fmt::fmt)
#else()
# target_include_directories(
# ${IRODS_PLUGIN_INVOCATION_FUNCTIONS}
# PRIVATE
# ${IRODS_EXTERNALS_FULLPATH_FMT}/include
# ${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include)
#
# target_link_libraries(
# ${IRODS_PLUGIN_INVOCATION_FUNCTIONS}
# PRIVATE
# ${IRODS_EXTERNALS_FULLPATH_FMT}/lib/libfmt.so)
#endif()
20 changes: 18 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,24 @@ target_link_libraries(
${IRODS_EXECUTABLE_NAME}
PRIVATE
irods_client
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_program_options.so
fmt::fmt)
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_program_options.so)

if (${IRODS_VERSION} VERSION_GREATER "4.3.1")
target_link_libraries(
${IRODS_EXECUTABLE_NAME}
PRIVATE
fmt::fmt)
else()
target_include_directories(
${IRODS_EXECUTABLE_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/include)

target_link_libraries(
${IRODS_EXECUTABLE_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/lib/libfmt.so)
endif()

add_dependencies(${IRODS_EXECUTABLE_NAME} irods_genquery2_client)

Expand Down
18 changes: 15 additions & 3 deletions parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ target_include_directories(
target_link_libraries(
${IRODS_PARSER_NAME}
PUBLIC
irods_common
nlohmann_json::nlohmann_json
fmt::fmt)
nlohmann_json::nlohmann_json)

if (${IRODS_VERSION} VERSION_GREATER "4.3.1")
target_link_libraries(
${IRODS_PARSER_NAME}
PRIVATE
irods_common
fmt::fmt)
else()
target_include_directories(
${IRODS_PARSER_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/include
${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include)
endif()
19 changes: 18 additions & 1 deletion rule_engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,28 @@ target_link_libraries(
PRIVATE
irods_server
nlohmann_json::nlohmann_json
fmt::fmt
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_filesystem.so
${IRODS_EXTERNALS_FULLPATH_BOOST}/lib/libboost_system.so
${CMAKE_DL_LIBS})

if (${IRODS_VERSION} VERSION_GREATER "4.3.1")
target_link_libraries(
${IRODS_RULE_ENGINE_PLUGIN_NAME}
PRIVATE
fmt::fmt)
else()
target_include_directories(
${IRODS_RULE_ENGINE_PLUGIN_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/include
${IRODS_EXTERNALS_FULLPATH_SPDLOG}/include)

target_link_libraries(
${IRODS_RULE_ENGINE_PLUGIN_NAME}
PRIVATE
${IRODS_EXTERNALS_FULLPATH_FMT}/lib/libfmt.so)
endif()

install(
TARGETS ${IRODS_RULE_ENGINE_PLUGIN_NAME}
LIBRARY DESTINATION ${IRODS_PLUGINS_DIRECTORY}/rule_engines)
Expand Down

0 comments on commit e695fdb

Please sign in to comment.