Add FindCURL-workaround CMake < 3.12.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
892f1c6f87
commit
c9009e1de0
|
@ -24,8 +24,16 @@ target_include_directories(${PROJECT_NAME}
|
|||
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>"
|
||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
|
||||
|
||||
# FindCURL provides an IMPORTED target since CMake 3.12.
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC CURL::libcurl)
|
||||
else()
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC ${CURL_INCLUDE_DIRS})
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC ${CURL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
|
||||
install(TARGETS ${PROJECT_NAME}
|
||||
|
|
Loading…
Reference in New Issue
Block a user