CI: Fix build errors on Ubuntu 18.04.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
libgit2-dev depends on libcurl4-gnutls-dev, CMake < 3.12 has no IMPORTED target for libcurl.
This commit is contained in:
parent
bede02659d
commit
2880f7f461
|
@ -92,7 +92,7 @@ steps:
|
||||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qq build-essential cmake clang pkg-config
|
- apt-get install -qq build-essential cmake clang pkg-config
|
||||||
- apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-openssl-dev
|
- apt-get install -qq catch libcgicc-dev nlohmann-json-dev libgit2-dev libcurl4-gnutls-dev
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- rm -rf build && mkdir -p build && cd build
|
||||||
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
- cmake -G "Unix Makefiles" -DWITH_TESTS=YES ..
|
||||||
- make VERBOSE=1
|
- make VERBOSE=1
|
||||||
|
|
|
@ -18,8 +18,13 @@ target_link_libraries(fediblock
|
||||||
PkgConfig::cgicc
|
PkgConfig::cgicc
|
||||||
nlohmann_json
|
nlohmann_json
|
||||||
std::filesystem
|
std::filesystem
|
||||||
PkgConfig::libgit2
|
PkgConfig::libgit2)
|
||||||
CURL::libcurl)
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS 3.12)
|
||||||
|
target_link_libraries(fediblock PUBLIC ${CURL_LIBRARIES})
|
||||||
|
else()
|
||||||
|
target_link_libraries(fediblock PUBLIC CURL::libcurl)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(${PROJECT_NAME} main.cpp)
|
add_executable(${PROJECT_NAME} main.cpp)
|
||||||
|
|
||||||
|
|
Reference in New Issue