History log of /curl/CMake/curl-config.cmake.in (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 6a1dcdc5 26-Aug-2024 Viktor Szakats

cmake: tidy up

- unroll two short loops.
- unfold lines.
- merge lines with their comments.
- add missing quotes.
- tidy up grammar in error/warning messages.

Cherry

cmake: tidy up

- unroll two short loops.
- unfold lines.
- merge lines with their comments.
- add missing quotes.
- tidy up grammar in error/warning messages.

Cherry-picked from #14692
Closes #14998

show more ...


# e1ab01d1 20-Aug-2024 Viktor Szakats

cmake: expand `CURL_USE_PKGCONFIG` to non-cross `MINGW`

Enable `CURL_USE_PKGCONFIG` by default for more environments:

- for `MINGW` targets when not using cross-compilation.
- s

cmake: expand `CURL_USE_PKGCONFIG` to non-cross `MINGW`

Enable `CURL_USE_PKGCONFIG` by default for more environments:

- for `MINGW` targets when not using cross-compilation.
- stop restricting vcpkg to MSVC. (this currently unlocks mingw,
also unlocked by the update above.)

Also:
- cache `CURL_USE_PKGCONFIG` in `CURLConfig.cmake`.
Suggested-by: Kai Pastor

Follow-up to c555ab469d74756b0e3a21f797237d53f9334ce3 #14575
Closes #14658

show more ...


# abf737b3 13-Sep-2024 Viktor Szakats

cmake: drop redundant zlib var, rename function (internals)

- drop redundant internal variable `USE_ZLIB`, rely on `HAVE_LIBZ`.

- rename `optional_dependency()` -> `curl_dependency_

cmake: drop redundant zlib var, rename function (internals)

- drop redundant internal variable `USE_ZLIB`, rely on `HAVE_LIBZ`.

- rename `optional_dependency()` -> `curl_dependency_option()`
Make `grep 'option('` hit this option. Namespaced.
It has a single use with `ZLIB`.

Closes #14918

show more ...


# 8b091380 19-Aug-2024 Viktor Szakats

cmake: minor tidy-ups

- show `OpenSSL v3+` when detected (as in `./configure`).
(this string also makes its way to `curl-config`.)
- prefer `unset(VAR)` over `set(VAR)`.
Same

cmake: minor tidy-ups

- show `OpenSSL v3+` when detected (as in `./configure`).
(this string also makes its way to `curl-config`.)
- prefer `unset(VAR)` over `set(VAR)`.
Same effect, but `unset()` tells the intent unambiguously.
https://cmake.org/cmake/help/latest/command/set.html
- drop "implementation" from an `option()` description.
- FindGSS: replace legacy keyword alias with modern alternative.
https://cmake.org/cmake/help/latest/command/get_filename_component.html
- move `CURL_STATIC_CRT` logic next to its `option()`.
- improve order of `libcurl.pc`/`curl-config` variable init lines.
- tests: drop/shorten custom target names.
They inflated generated make files by 550KB.
Keep target name logic for sync between code snippets.
Follow-up to a2ef5d36b3cdec8120a4a9b782d18d58a70d4236 #14660
- clear a variable after use.
- restore `STATUS` for `Features:`/`Protocols:` `message()`s:
Without it the output goes to stderr, and appears in red in CMake GUI.
It doesn't seem possible to show a line on stdout without leading
underscores to match `curl -V` and `./configure` output.
Partial revert of acbc6b703f6b0ee568d053f6f2565fbc107b5fd3 #14197
- WindowsCache: move `HAVE_LINUX_TCP_H` into the header group.
- move strings to the same line as their `STRING` keyword.
- formatting in generated code.
- delete bogus comment.
- unfold lines for readability.
- fix a too long line. (for cmakelint)
- missing quotes, whitespace, comments.

Closes #14610

show more ...


# c555ab46 16-Aug-2024 Viktor Szakats

cmake: limit `pkg-config` to UNIX and MSVC+vcpkg by default

Limits `pkg-config` to UNIX and MSVC with vcpkg, by default. Compared to
curl 8.9.1, this unlocks `pkg-config` on MSVC with vc

cmake: limit `pkg-config` to UNIX and MSVC+vcpkg by default

Limits `pkg-config` to UNIX and MSVC with vcpkg, by default. Compared to
curl 8.9.1, this unlocks `pkg-config` on MSVC with vcpkg.

This condition might be updated in the future depending on where
`pkg-config` can be useful without breaking things. (e.g. to non-cross
MINGW, or all MINGW).

In the meantime everyone is free to override the default and test their
build with `pkg-config` by setting the `CURL_USE_PKGCONFIG=ON` CMake
option.

Closes #14575

show more ...


# b910122f 12-Aug-2024 Viktor Szakats

cmake: add `CURL_USE_PKGCONFIG` option

Add option to control whether to use `pkg-config` to detect
dependencies. Curl's CMake uses `pkg-config` by default for all targets
except for

cmake: add `CURL_USE_PKGCONFIG` option

Add option to control whether to use `pkg-config` to detect
dependencies. Curl's CMake uses `pkg-config` by default for all targets
except for MSVC without vcpkg.

With the CMake option `-DCURL_USE_PKGCONFIG=ON` you can override it to
use `pkg-config` always.

If `pkg-config` is causing issues, e.g. in cross-builds or other cases,
`-DCURL_USE_PKGCONFIG=OFF` disables all use of `pkg-config`.

Also add it to `curl-config.cmake`. Not yet used, but will be once curl
starts referencing any curl-specific `Find*` module from this public
script.

Follow-up to 9dfdc6ff42ba045ec48056bb6d2072f2fcac2e9d #14483
Closes #14504

show more ...


# 1dec702c 05-Jun-2024 Viktor Szakats

cmake: bring `curl-config.cmake` closer to `FindCURL`

Set `CURL_LIBRARIES` and `CURL_INCLUDE_DIRS` variables
for compatibility with CMake's `FindCURL.cmake`:
https://github.com/Kitwa

cmake: bring `curl-config.cmake` closer to `FindCURL`

Set `CURL_LIBRARIES` and `CURL_INCLUDE_DIRS` variables
for compatibility with CMake's `FindCURL.cmake`:
https://github.com/Kitware/CMake/blob/b411d0146c2e06acfb0c823bb039e99f0191b611/Modules/FindCURL.cmake#L209

For dependent projects, CMake's suggestion is to replace
`CURL_LIBRARIES` with `CURL::libcurl`, and drop `CURL_INCLUDE_DIRS`.

Reported-by: Aurélien Pierre
Ref: https://curl.se/mail/lib-2024-06/0014.html
Ref: https://gitlab.kitware.com/cmake/cmake/-/issues/24580
Closes #13897

show more ...


# 45d2ff6f 22-Sep-2023 Kai Pastor

cmake: fix multiple include of CURL package

Fixes errors on second `find_package(CURL)`. This is a frequent case
with transitive dependencies:
```
CMake Error at ...:
add_l

cmake: fix multiple include of CURL package

Fixes errors on second `find_package(CURL)`. This is a frequent case
with transitive dependencies:
```
CMake Error at ...:
add_library cannot create ALIAS target "CURL::libcurl" because another
target with the same name already exists.
```

Test to reproduce:
```cmake
cmake_minimum_required(VERSION 3.27) # must be 3.18 or higher

project(curl)

set(CURL_DIR "example/lib/cmake/CURL/")
find_package(CURL CONFIG REQUIRED)
find_package(CURL CONFIG REQUIRED) # fails

add_executable(main main.c)
target_link_libraries(main CURL::libcurl)
```

Ref: https://cmake.org/cmake/help/latest/release/3.18.html#other-changes
Ref: https://cmake.org/cmake/help/v3.18/policy/CMP0107.html
Ref: #12300
Assisted-by: Harry Mallon
Closes #11913

show more ...


# 121e60b9 08-Aug-2023 Viktor Szakats

cmake: fix to use variable for the curl namespace

Replace (wrong) literal with a variable to specify the curl
namespace.

Follow-up to 1199308dbc902c52be67fc805c72dd2582520d30 #1

cmake: fix to use variable for the curl namespace

Replace (wrong) literal with a variable to specify the curl
namespace.

Follow-up to 1199308dbc902c52be67fc805c72dd2582520d30 #11505

Reported-by: balikalina on Github
Fixes https://github.com/curl/curl/commit/1199308dbc902c52be67fc805c72dd2582520d30#r123923098
Closes #11629

show more ...


# 1199308d 22-Jun-2023 Viktor Szakats

cmake: support building static and shared libcurl in one go

This patch adds the ability to build a static and shared libcurl library
in a single build session. It also adds an option to

cmake: support building static and shared libcurl in one go

This patch adds the ability to build a static and shared libcurl library
in a single build session. It also adds an option to select which one to
use when building the curl executable.

New build options:
- `BUILD_STATIC_LIBS`. Default: `OFF`.
Enabled automatically if `BUILD_SHARED_LIBS` is `OFF`.
- `BUILD_STATIC_CURL`. Default: `OFF`.
Requires `BUILD_STATIC_LIBS` enabled.
Enabled automatically if building static libcurl only.
- `STATIC_LIB_SUFFIX`. Default: empty.
- `IMPORT_LIB_SUFFIX`. Default: `_imp` if implib filename would collide
with static lib name (typically with MSVC) in Windows builds.
Otherwise empty.

Also:

- Stop setting the `CURL_STATICLIB` macro via `curl_config.h`, and pass
it directly to the compiler. This also allows to delete a condition
from `tests/server/CMakeLists.txt`.

- Complete a TODO by following the logic used in autotools (also for
`LIBCURL_NO_SHARED`), and set `-DCURL_STATICLIB` in `Cflags:` of
`libcurl.pc` for _static-only_ curl builds.

- Convert an existing CI test to build both shared and static libcurl.

Closes #11505

show more ...


# 2bc1d775 02-Jan-2023 Daniel Stenberg

copyright: update all copyright lines and remove year ranges

- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- save

copyright: update all copyright lines and remove year ranges

- they are mostly pointless in all major jurisdictions
- many big corporations and projects already don't use them
- saves us from pointless churn
- git keeps history for us
- the year range is kept in COPYING

checksrc is updated to allow non-year using copyright statements

Closes #10205

show more ...


# ad9bc597 17-May-2022 max.mehl

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the

copyright: make repository REUSE compliant

Add licensing and copyright information for all files in this repository. This
either happens in the file itself as a comment header or in the file
`.reuse/dep5`.

This commit also adds a Github workflow to check pull requests and adapts
copyright.pl to the changes.

Closes #8869

show more ...


Revision tags: curl-7_76_1, curl-7_76_0, curl-7_75_0, curl-7_74_0
# 4d2f8006 04-Nov-2020 Daniel Stenberg

curl.se: new home

Closes #6172


Revision tags: curl-7_73_0, tiny-curl-7_72_0, curl-7_72_0, curl-7_71_1, curl-7_71_0, curl-7_70_0
# 9a8b3b3e 23-Mar-2020 Daniel Stenberg

copyright: fix out-of-date copyright ranges and missing headers

Reported by the new script 'scripts/copyright.pl'. The script has a
regex whitelist for the files that don't need copyrigh

copyright: fix out-of-date copyright ranges and missing headers

Reported by the new script 'scripts/copyright.pl'. The script has a
regex whitelist for the files that don't need copyright headers.

Removed three (mostly usesless) README files from docs/

Closes #5141

show more ...


Revision tags: curl-7_69_1, curl-7_69_0, curl-7_68_0, curl-7_67_0, curl-7_66_0, curl-7_65_3, curl-7_65_2, curl-7_65_1, curl-7_65_0, curl-7_64_1, curl-7_64_0, curl-7_63_0, curl-7_62_0
# e97679a3 27-Oct-2018 Tuomo Rinne

cmake: uniform ZLIB to use USE_ variable and clean curl-config.cmake.in

Closes #3123


# dd98c1f3 11-Oct-2018 Tuomo Rinne

cmake: add find_dependency call for ZLIB to CMake config file


Revision tags: curl-7_61_1
# 69328490 17-Jul-2018 Ruslan Baratov

CMake: Improve config installation

Use 'GNUInstallDirs' standard module to set destinations of installed
files.

Use uppercase "CURL" names instead of lowercase "curl" to match s

CMake: Improve config installation

Use 'GNUInstallDirs' standard module to set destinations of installed
files.

Use uppercase "CURL" names instead of lowercase "curl" to match standard
'FindCURL.cmake' CMake module:
* https://cmake.org/cmake/help/latest/module/FindCURL.html

Meaning:
* Install 'CURLConfig.cmake' instead of 'curl-config.cmake'
* User should call 'find_package(CURL)' instead of 'find_package(curl)'

Use 'configure_package_config_file' function to generate
'CURLConfig.cmake' file. This will make 'curl-config.cmake.in' template
file smaller and handle components better. E.g. current configuration
report no error if user specified unknown components (note: new
configuration expects no components, report error if user will try to
specify any).

Closes https://github.com/curl/curl/pull/2849

show more ...


# 71b3c675 15-Sep-2018 slodki

cmake: don't require OpenSSL if USE_OPENSSL=OFF

User must have OpenSSL installed even if not used by libcurl at all
since 7.61.1 release. Broken at
7867aaa9a01decf93711428462335be8c

cmake: don't require OpenSSL if USE_OPENSSL=OFF

User must have OpenSSL installed even if not used by libcurl at all
since 7.61.1 release. Broken at
7867aaa9a01decf93711428462335be8cef70212

Reviewed-by: Sergei Nikulov
Closes #3001

show more ...


# 7867aaa9 17-Jul-2018 John Butterfield

cmake: link curl to the OpenSSL targets instead of lib absolute paths

Reviewed-by: Jakub Zakrzewski
Reviewed-by: Sergei Nikulov
Closes #2753