mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
generic: replace custom Curl module with CMake provided one
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
81e9e93e5d
commit
6f85921337
4 changed files with 3 additions and 46 deletions
|
@ -69,8 +69,8 @@ set_package_properties(ENCHANT PROPERTIES
|
|||
PURPOSE "Spell checking support via Enchant"
|
||||
)
|
||||
|
||||
find_package(Curl)
|
||||
set_package_properties(Curl PROPERTIES
|
||||
find_package(CURL)
|
||||
set_package_properties(CURL PROPERTIES
|
||||
DESCRIPTION "Command line tool and library for transferring data with URLs"
|
||||
URL "https://curl.se/"
|
||||
TYPE REQUIRED
|
||||
|
|
|
@ -15,7 +15,6 @@ set(cmakeFilesDontInstall
|
|||
FindLibCDIO.cmake
|
||||
FindLibExtractor.cmake
|
||||
FindDevinfo.cmake
|
||||
FindCurl.cmake
|
||||
)
|
||||
|
||||
# Explicitly list all files which will be installed.
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
# Try to find curl library, once done this will define:
|
||||
#
|
||||
# CURL_FOUND - system has curl
|
||||
# CURL_INCLUDE_DIR - the curl include directory
|
||||
# CURL_LIBRARIES - the libraries needed to use curl
|
||||
# CURL_DEFINITIONS - compiler switches required for using curl
|
||||
#
|
||||
# Copyright (c) 2022 Ivailo Monev <xakepa10@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
if(NOT WIN32)
|
||||
include(FindPkgConfig)
|
||||
pkg_check_modules(PC_CURL QUIET libcurl)
|
||||
|
||||
set(CURL_INCLUDE_DIR ${PC_CURL_INCLUDE_DIRS})
|
||||
set(CURL_LIBRARIES ${PC_CURL_LIBRARIES})
|
||||
endif()
|
||||
|
||||
set(CURL_VERSION ${PC_CURL_VERSION})
|
||||
set(CURL_DEFINITIONS ${PC_CURL_CFLAGS_OTHER})
|
||||
|
||||
if(NOT CURL_INCLUDE_DIR OR NOT CURL_LIBRARIES)
|
||||
find_path(CURL_INCLUDE_DIR
|
||||
NAMES curl/curl.h
|
||||
HINTS $ENV{CURLDIR}/include
|
||||
)
|
||||
|
||||
find_library(CURL_LIBRARIES
|
||||
NAMES curl
|
||||
HINTS $ENV{CURLDIR}/lib
|
||||
)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Curl
|
||||
VERSION_VAR CURL_VERSION
|
||||
REQUIRED_VARS CURL_LIBRARIES CURL_INCLUDE_DIR
|
||||
)
|
||||
|
||||
mark_as_advanced(CURL_INCLUDE_DIR CURL_LIBRARIES)
|
|
@ -2,7 +2,7 @@ project(kioslave-http)
|
|||
|
||||
include_directories(
|
||||
${KDE4_KIO_INCLUDES}
|
||||
${CURL_INCLUDES}
|
||||
${CURL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
########### next target ###############
|
||||
|
|
Loading…
Add table
Reference in a new issue