Skip to content

Commit

Permalink
FindCURL module does not provide imported target on older CMake versi…
Browse files Browse the repository at this point in the history
…ons (#49)

Fixes #48
  • Loading branch information
marcomagdy authored Jun 25, 2019
1 parent e185ee6 commit 13e5bd6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ target_include_directories(${PROJECT_NAME} PUBLIC
$<INSTALL_INTERFACE:include>)

find_package(CURL REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
if (CMAKE_VERSION VERSION_LESS 3.12)
target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES})
else()
target_link_libraries(${PROJECT_NAME} PRIVATE CURL::libcurl)
endif()

target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIRS})

target_compile_options(${PROJECT_NAME} PRIVATE
Expand Down

0 comments on commit 13e5bd6

Please sign in to comment.