Skip to content

Commit

Permalink
Merge pull request #290 from yuchen0cc/main
Browse files Browse the repository at this point in the history
fix compatible of BUILD_CURL_FROM_SOURCE
  • Loading branch information
liulanzheng authored Nov 17, 2023
2 parents fa1b5d1 + 31cb7ac commit bd41d6a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CMake/FindCURL.cmake → CMake/Findcurl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if(${BUILD_CURL_FROM_SOURCE})
if (NOT curl_bundle_POPULATED)
FetchContent_Populate(curl_bundle)
endif()
find_package(OpenSSL)
find_package(openssl)
add_custom_command(
OUTPUT ${curl_bundle_BINARY_DIR}/lib/libcurl.a
WORKING_DIRECTORY ${curl_bundle_SOURCE_DIR}
Expand All @@ -26,6 +26,7 @@ if(${BUILD_CURL_FROM_SOURCE})
export CXX=${CMAKE_CXX_COMPILER} &&
export LD=${CMAKE_LINKER} &&
export CFLAGS=-fPIC &&
export LIBS=-ldl &&
autoreconf -i && sh configure --with-ssl="${OPENSSL_ROOT_DIR}"
--without-libssh2 --enable-static --enable-shared=no --enable-optimize
--disable-manual --without-libidn
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions CMake/Findphoton.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ else()
endif()

if (BUILD_CURL_FROM_SOURCE)
find_package(OpenSSL REQUIRED)
find_package(CURL REQUIRED)
find_package(openssl REQUIRED)
find_package(curl REQUIRED)
add_dependencies(photon_obj CURL::libcurl OpenSSL::SSL OpenSSL::Crypto)
endif()

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
find_package(CURL REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(curl REQUIRED)
find_package(openssl REQUIRED)
find_package(aio REQUIRED)
find_package(rapidjson REQUIRED)

Expand Down
3 changes: 1 addition & 2 deletions src/overlaybd/cache/ocf_cache/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include_directories($ENV{GFLAGS}/include)
link_directories($ENV{GFLAGS}/lib)

find_package(CURL REQUIRED)
find_package(curl REQUIRED)

add_executable(ocf_perf_test ocf_perf_test.cpp)
target_include_directories(
Expand All @@ -19,4 +19,3 @@ add_test(
NAME ocf_perf_test
COMMAND ${EXECUTABLE_OUTPUT_PATH}/ocf_perf_test --ut_pass=true
)

2 changes: 1 addition & 1 deletion src/overlaybd/registryfs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
file(GLOB SOURCE_REGISTRYFS "*.cpp")

find_package(CURL REQUIRED)
find_package(curl REQUIRED)

add_library(registryfs_lib STATIC ${SOURCE_REGISTRYFS})
target_include_directories(registryfs_lib PUBLIC
Expand Down

0 comments on commit bd41d6a

Please sign in to comment.