diff --git a/CMakeLists.txt b/CMakeLists.txt index 7378ae5..1238fa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 diff --git a/src/TokenFile.hh b/src/TokenFile.hh index afee102..5453edf 100644 --- a/src/TokenFile.hh +++ b/src/TokenFile.hh @@ -22,6 +22,7 @@ #include #include +#include #include // A class representing a bearer token found from a file on disk diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f06ebe7..0c68eb2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 ) @@ -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 )