From c9009e1de03d28a96447571a12dde72e1cda6d95 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 4 Jan 2020 12:10:44 +0100 Subject: Add FindCURL-workaround CMake < 3.12. --- src/CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8bc8557..e6d20ee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -24,8 +24,16 @@ target_include_directories(${PROJECT_NAME} "$" "$") -target_link_libraries(${PROJECT_NAME} - PUBLIC CURL::libcurl) +# 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} -- cgit v1.2.3-54-g00ecf ue='main' selected='selected'>main C++ wrapper for the Mastodon and Pleroma APIs. This mirror exists as a backup in case the original project is ever gone from elsewhere on the Net.tastytea
summaryrefslogtreecommitdiffstats
blob: 40b1371fc37e70b2e7ea2038535c58485c05fd68 (plain)
1
2
3
4
5
6
7
8
9
10
11