Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,297
    • Issues 3,297
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 9
    • Merge Requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #18379

Closed
Open
Created Sep 15, 2018 by slodki@slodkiContributor

FindCURL: use COMPONENTS to verify library features avaiable

libcurl library is single monolithic binary with multiple optional protocols and features. Some of binary packages are build with all features enabled but it's unknown for CMake user. Simple find_package(CURL) could be not enough to be sure correct libcurl is available and delivers expected features.

Using #18378 approach should enable protocols and additional features listed in libbcurl.pc to be analysed and verified at CMake configuration time.

find_package(CURL COMPONENTS HTTP HTTPS LDAP LDAPS NTLM OPTIONAL_COMPONENTS IPv6 HTTPS-proxy) syntax should be supported - user should be warned if some listed features are missing and error raised if they are required.

Example of libcurl.pc file from Debian:

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib/x86_64-linux-gnu
includedir=/usr/include/x86_64-linux-gnu
supported_protocols="DICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTMP RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP"
supported_features="SSL IPv6 UnixSockets libz AsynchDNS IDN GSS-API PSL SPNEGO Kerberos NTLM NTLM_WB TLS-SRP HTTP2 HTTPS-proxy"

Name: libcurl
URL: https://curl.haxx.se/
Description: Library to transfer files with ftp, http, etc.
Version: 7.52.1
Libs: -L${libdir} -lcurl
Libs.private: -lnghttp2 -lidn2 -lrtmp -lssh2 -lpsl -lssl -lcrypto -lssl -lcrypto -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,-z,relro -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -llber -llber -lldap -lz
Cflags: -I${includedir}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None