Skip to content

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

Merged
phlptp merged 2 commits into
CLIUtils:mainfrom
j-rivero:back_pkgconfig_non_arch
Mar 11, 2024
Merged

phlptp merged 2 commits into
CLIUtils:mainfrom
j-rivero:back_pkgconfig_non_arch

Conversation

@j-rivero

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Feb 26, 2024 •

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

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

@phlptp

phlptp commented Feb 26, 2024

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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

phlptp commented Feb 26, 2024

Copy link
Copy Markdown
Collaborator

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
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
Copy Markdown

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