Skip to content
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

Support relative prefix in pkg-config #291

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

cary-ilm
Copy link
Member

@cary-ilm cary-ilm commented Feb 3, 2023

CMake now exports CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_INCLUDEDIR instead of the FULL variables, and Imath.pc.in prepends the prefix explicitly, which makes it possible to support relative installation paths

Signed-off-by: Cary Phillips cary@ilm.com

CMake now exports CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_INCLUDEDIR
instead of the *_FULL_* variables, and Imath.pc.in prepends the prefix
explicitly, which makes it possible to support relative installation
paths

Signed-off-by: Cary Phillips <cary@ilm.com>
Copy link
Contributor

@meshula meshula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kmilos
Copy link

kmilos commented Feb 4, 2023

Thanks for getting to this, but this is not sufficient. It only addresses the relocability when CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_INCLUDEDIR are indeed relative, but for some platforms like NixOS they are actually absolute so this scheme doesn't work out there. Please see the provided links for a workaround that handles both cases.

Signed-off-by: Cary Phillips <cary@ilm.com>
@cary-ilm
Copy link
Member Author

cary-ilm commented Feb 4, 2023

OK, I added the IS_ABSOLUTE logic you referenced, and this seems to now handle -DCMAKE_INSTALL_INCLUDEDIR=/path. But let me know if there's something this still doesn't address.

@kmilos
Copy link

kmilos commented Feb 5, 2023

That should be it, thanks!

cary-ilm added a commit to cary-ilm/openexr that referenced this pull request Feb 5, 2023
During pkg-config generation, CMake now uses
`CMAKE_INSTALL_LIBDIR`/`CMAKE_INSTALL_INCLUDEDIR` instead of the
`_FULL_` variables, and does not prepend the prefix if they are absolute
paths, which makes it possible to support relative installation paths.

See AcademySoftwareFoundation/Imath#281 and
AcademySoftwareFoundation/Imath#291

Signed-off-by: Cary Phillips <cary@ilm.com>
@cary-ilm cary-ilm merged commit 247206b into AcademySoftwareFoundation:main Feb 7, 2023
cary-ilm added a commit to AcademySoftwareFoundation/openexr that referenced this pull request Feb 7, 2023
…on (#1330)

During pkg-config generation, CMake now uses
`CMAKE_INSTALL_LIBDIR`/`CMAKE_INSTALL_INCLUDEDIR` instead of the
`_FULL_` variables, and does not prepend the prefix if they are absolute
paths, which makes it possible to support relative installation paths.

See AcademySoftwareFoundation/Imath#281 and
AcademySoftwareFoundation/Imath#291

Signed-off-by: Cary Phillips <cary@ilm.com>
cary-ilm added a commit to cary-ilm/Imath that referenced this pull request Feb 27, 2023
* Support relative prefix in pkg-config

CMake now exports CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_INCLUDEDIR
instead of the *_FULL_* variables, and Imath.pc.in prepends the prefix
explicitly, which makes it possible to support relative installation
paths

Signed-off-by: Cary Phillips <cary@ilm.com>

* Add CMake logic to handle relative vs absolute libdir/includedir

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>
cary-ilm added a commit that referenced this pull request Feb 28, 2023
* Support relative prefix in pkg-config

CMake now exports CMAKE_INSTALL_LIBDIR/CMAKE_INSTALL_INCLUDEDIR
instead of the *_FULL_* variables, and Imath.pc.in prepends the prefix
explicitly, which makes it possible to support relative installation
paths

Signed-off-by: Cary Phillips <cary@ilm.com>

* Add CMake logic to handle relative vs absolute libdir/includedir

Signed-off-by: Cary Phillips <cary@ilm.com>

---------

Signed-off-by: Cary Phillips <cary@ilm.com>
cary-ilm added a commit to cary-ilm/openexr that referenced this pull request Mar 3, 2023
…on (AcademySoftwareFoundation#1330)

During pkg-config generation, CMake now uses
`CMAKE_INSTALL_LIBDIR`/`CMAKE_INSTALL_INCLUDEDIR` instead of the
`_FULL_` variables, and does not prepend the prefix if they are absolute
paths, which makes it possible to support relative installation paths.

See AcademySoftwareFoundation/Imath#281 and
AcademySoftwareFoundation/Imath#291

Signed-off-by: Cary Phillips <cary@ilm.com>
cary-ilm added a commit to AcademySoftwareFoundation/openexr that referenced this pull request Mar 5, 2023
…on (#1330)

During pkg-config generation, CMake now uses
`CMAKE_INSTALL_LIBDIR`/`CMAKE_INSTALL_INCLUDEDIR` instead of the
`_FULL_` variables, and does not prepend the prefix if they are absolute
paths, which makes it possible to support relative installation paths.

See AcademySoftwareFoundation/Imath#281 and
AcademySoftwareFoundation/Imath#291

Signed-off-by: Cary Phillips <cary@ilm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants