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

Restore non-arch dependant path for the pkgconfig file #1012

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

j-rivero
Copy link
Contributor

Originally setup at #635 but reverted in #916 without any specific reason that I can find.

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4ee3af) to head (62815ca).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##              main     #1012    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           17        17            
  Lines         4546      4556    +10     
  Branches         0       971   +971     
==========================================
+ Hits          4546      4556    +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@henryiii
Copy link
Collaborator

@phlptp, looks like you moved it, was there a reason?

@phlptp
Copy link
Collaborator

phlptp commented Feb 26, 2024

I was going to by the pkg-config docs Which has the default location in the lib directory. I don't use pkg-config much so if we are sure the new location is cross platform and the tests pass, other than making a comment in the cmake file I have no issue changing it.

@j-rivero
Copy link
Contributor Author

the new location is cross platform and the tests pass, other than making a comment in the cmake file I have no issue changing it.

Using GNUInstallDirs as the wrapper to install files, we have:

DATADIR
read-only architecture-independent data (DATAROOTDIR)

Which on my experience has worked well to define the paths of the pkgconfig files for all kind of projects. Let me know if you see any use case that is failing due to this change.

@phlptp
Copy link
Collaborator

phlptp commented Feb 26, 2024

On some projects the datadir is used to store model files and other "data" necessary for program operation or examples. Mixing library information into that seems a bit counterintuitive to me, but if that is what you regularly use, and pkgconfig works normally with that I would suggest adding a comment in the cmake file, and go forward with it.

@phlptp phlptp merged commit 852fc94 into CLIUtils:main Mar 11, 2024
54 checks passed
@@ -4,4 +4,4 @@ else()
configure_file("cmake/CLI11.pc.in" "CLI11.pc" @ONLY)
endif()

install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
install(FILES "${PROJECT_BINARY_DIR}/CLI11.pc" DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig")
Copy link

Choose a reason for hiding this comment

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

This change is wrong at least when using cli11 in compiled mode. The binary artifact (libCLI11) is very much arch dependant.
Noticed while updating the vcpkg package.

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.

4 participants