Skip to content

Allow for CMake to use absolute install paths #486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2022

Conversation

jonringer
Copy link
Contributor

@jonringer jonringer commented Oct 13, 2022

Certain build systems such as Nix will install dev related items separately from library and runtime outputs. The current:

# libcares.pc.cmake
prefix=@CMAKE_INSTALL_PREFIX@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@

will create paths such as includedir=/nix/store/pgvk94m98y2sq5x91mpz2nsm7pd2yqkp-c-ares-1.18.1-dev//nix/store/pgvk94m98y2sq5x91mpz2nsm7pd2yqkp-c-ares-1.18.1-dev/include which should be includedir=/nix/store/pgvk94m98y2sq5x91mpz2nsm7pd2yqkp-c-ares-1.18.1-dev/include

Result of PR:

cat ./result-dev/lib/pkgconfig/libcares.pc
#***************************************************************************
# Project        ___       __ _ _ __ ___  ___
#               / __|____ / _` | '__/ _ \/ __|
#              | (_|_____| (_| | | |  __/\__ \
#               \___|     \__,_|_|  \___||___/
#
exec_prefix=/nix/store/shskwbrmq0nl2xvwc53xfby6x7xymils-c-ares-1.18.1/bin
libdir=/nix/store/shskwbrmq0nl2xvwc53xfby6x7xymils-c-ares-1.18.1/lib
includedir=/nix/store/i14bqixhc0gi30ajlgbn31g0p77asj5n-c-ares-1.18.1-dev/include

Name: c-ares
URL: https://c-ares.org/
Description: asynchronous DNS lookup library
Version: 1.18.1
Requires:
Requires.private:
Cflags: -I${includedir}
Libs: -L${libdir} -lcares
Libs.private:

@jonringer
Copy link
Contributor Author

jonringer commented Oct 13, 2022

failing CI gate looks unrelated, the autotool/configure step is failing:

configure: error: in `/tmp/cirrus-ci-build/atoolsbld':
configure: error: C compiler cannot create executables
See `config.log' for more details
scan-build: Removing directory '/tmp/scan-build-2022-10-13-200111-18915-1' because it contains no reports.
scan-build: No bugs found.

@bradh352 bradh352 merged commit a1675ba into c-ares:main Oct 23, 2022
@jonringer jonringer deleted the allow-absolute-paths branch November 3, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants