Skip to content

Commit

Permalink
Fix compilation issues on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
bbockelm committed Jun 9, 2024
1 parent 0085fdd commit 1bc844a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set( CMAKE_BUILD_TYPE Debug )

find_package( Xrootd REQUIRED )
find_package( CURL REQUIRED )
find_package( Threads REQUIRED )

include (FindPkgConfig)
pkg_check_modules(LIBCRYPTO REQUIRED libcrypto)
Expand Down Expand Up @@ -59,8 +60,8 @@ include_directories(${XROOTD_INCLUDES} ${CURL_INCLUDE_DIRS} ${LIBCRYPTO_INCLUDE_
add_library(XrdS3 SHARED src/S3File.cc src/S3Directory.cc src/S3AccessInfo.cc src/S3FileSystem.cc src/AWSv4-impl.cc src/S3Commands.cc src/HTTPCommands.cc src/TokenFile.cc src/stl_string_utils.cc src/shortfile.cc src/logging.cc)
add_library(XrdHTTPServer SHARED src/HTTPFile.cc src/HTTPFileSystem.cc src/HTTPCommands.cc src/TokenFile.cc src/stl_string_utils.cc src/shortfile.cc src/logging.cc)

target_link_libraries(XrdS3 -ldl ${XROOTD_UTILS_LIB} ${XROOTD_SERVER_LIB} ${CURL_LIBRARIES} ${LIBCRYPTO_LIBRARIES} tinyxml2::tinyxml2)
target_link_libraries(XrdHTTPServer -ldl ${XROOTD_UTILS_LIB} ${XROOTD_SERVER_LIB} ${CURL_LIBRARIES} ${LIBCRYPTO_LIBRARIES})
target_link_libraries(XrdS3 -ldl ${XROOTD_UTILS_LIB} ${XROOTD_SERVER_LIB} ${CURL_LIBRARIES} ${LIBCRYPTO_LIBRARIES} tinyxml2::tinyxml2 Threads::Threads)
target_link_libraries(XrdHTTPServer -ldl ${XROOTD_UTILS_LIB} ${XROOTD_SERVER_LIB} ${CURL_LIBRARIES} ${LIBCRYPTO_LIBRARIES} Threads::Threads)

# The CMake documentation strongly advises against using these macros; instead, the pkg_check_modules
# is supposed to fill out the full path to ${LIBCRYPTO_LIBRARIES}. As of cmake 3.26.1, this does not
Expand Down
1 change: 1 addition & 0 deletions src/TokenFile.hh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <XrdSys/XrdSysPthread.hh>

#include <chrono>
#include <memory>
#include <string>

// A class representing a bearer token found from a file on disk
Expand Down
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_executable( s3-gtest s3_tests.cc
../src/S3FileSystem.cc
../src/shortfile.cc
../src/stl_string_utils.cc
../src/TokenFile.cc
../src/HTTPCommands.cc
../src/S3Commands.cc
)
Expand All @@ -16,6 +17,7 @@ add_executable( http-gtest http_tests.cc
../src/HTTPFileSystem.cc
../src/HTTPCommands.cc
../src/stl_string_utils.cc
../src/TokenFile.cc
../src/shortfile.cc
../src/logging.cc
)
Expand Down

0 comments on commit 1bc844a

Please sign in to comment.