Skip to content

cmake: drop if(PKG_CONFIG_FOUND) guard for pkg_check_modules()#14309

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:nettle-fixup
Closed

cmake: drop if(PKG_CONFIG_FOUND) guard for pkg_check_modules()#14309
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:nettle-fixup

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 30, 2024

The oldest cmake supported by curl is v3.7.0, which already has such
guard (using PKG_CONFIG_EXECUTABLE) inside pkg_check_modules(). The
advantage of leaving that guard to CMake is that it will define/reset
all output variables, while the manual guard doesn't do this and also
leaves for example NETTLE_FOUND undefined.

Delete the single use of this guard from the recently added nettle
detection, where I included it by accident. Then possibly re-introduce
it universally if we find it useful after more evaluation.

Follow-up to 669ce42 #14285
Closes #14309

The oldest cmake supported by curl is 3.7.0, which already has a guard
inside `pkg_check_modules()`. The advantage of leaving that to CMake is
that it will define/reset all variables, while the manual guard doesn't
do this and also leave `NETTLE_FOUND` undefined.

Delete the single use of this check in the recently added NETTLE patch
by accident. And re-introduce this later everywhere if we find it useful after
more evaluation.

Follow-up to 669ce42 curl#14285
Closes curl#14309
@vszakats vszakats changed the title cmake: revert if(PKG_CONFIG_FOUND) around pkg_check_modules() cmake: drop if(PKG_CONFIG_FOUND) guard for pkg_check_modules() Jul 30, 2024
@vszakats vszakats closed this in b92ead3 Jul 30, 2024
@vszakats vszakats deleted the nettle-fixup branch July 30, 2024 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant