Skip to content

Commit

Permalink
fix makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mhekkel committed Apr 8, 2024
1 parent 7b4ad12 commit a356800
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,18 @@ if(ZEEP_BUILD_LIBRARY)
configure_file(${PROJECT_SOURCE_DIR}/cmake/asio.hpp.in ${PROJECT_SOURCE_DIR}/include/zeep/http/asio.hpp @ONLY)
endif()

find_package(date 3.0.1 QUIET NAMES date libhowardhinnant-date)
if(NOT (TARGET date OR date_FOUND))
find_package(date 3.0.1 QUIET NAMES date libhowardhinnant-date)

if(NOT date_FOUND)
if(ZEEP_ALLOW_FETCH_CONTENT)
include(FetchContent)
if(NOT date_FOUND)
if(ZEEP_ALLOW_FETCH_CONTENT)
include(FetchContent)

FetchContent_Declare(date GIT_REPOSITORY https://github.com/HowardHinnant/date.git GIT_TAG v3.0.1)
FetchContent_MakeAvailable(date)
else()
message(FATAL_ERROR "The date package was not found, please install https://github.com/HowardHinnant/date and try again")
FetchContent_Declare(date GIT_REPOSITORY https://github.com/HowardHinnant/date.git GIT_TAG v3.0.1)
FetchContent_MakeAvailable(date)
else()
message(FATAL_ERROR "The date package was not found, please install https://github.com/HowardHinnant/date and try again")
endif()
endif()
endif()

Expand Down Expand Up @@ -327,18 +329,21 @@ get_directory_property(HAS_PARENT PARENT_DIRECTORY)

if(BUILD_TESTING AND NOT HAS_PARENT)
find_package(Boost REQUIRED)
find_package(libmcfp QUIET)

if(NOT libmcfp_FOUND)
if(ZEEP_ALLOW_FETCH_CONTENT)
include(FetchContent)
if(NOT (libmcfp_FOUND OR TARGET libmcfp))
find_package(libmcfp QUIET)

FetchContent_Declare(libmcfp GIT_REPOSITORY https://github.com/mhekkel/libmcfp GIT_TAG v1.2.4)
FetchContent_MakeAvailable(libmcfp)
elseif(EXISTS libmcfp/CMakeLists.txt)
add_subdirectory(libmcfp EXCLUDE_FROM_ALL)
else()
message(FATAL_ERROR "The libmcfp package was not found, please install https://github.com/mhekkel/libmcfp and try again")
if(NOT libmcfp_FOUND)
if(ZEEP_ALLOW_FETCH_CONTENT)
include(FetchContent)

FetchContent_Declare(libmcfp GIT_REPOSITORY https://github.com/mhekkel/libmcfp GIT_TAG v1.2.4)
FetchContent_MakeAvailable(libmcfp)
elseif(EXISTS libmcfp/CMakeLists.txt)
add_subdirectory(libmcfp EXCLUDE_FROM_ALL)
else()
message(FATAL_ERROR "The libmcfp package was not found, please install https://github.com/mhekkel/libmcfp and try again")
endif()
endif()
endif()

Expand Down

0 comments on commit a356800

Please sign in to comment.