-
Notifications
You must be signed in to change notification settings - Fork 22
Add pkg-config support for zoslib #96
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
Conversation
Co-authored-by: sachintu47 <[email protected]>
Co-authored-by: sachintu47 <[email protected]>
Co-authored-by: sachintu47 <[email protected]>
|
@copilot can we have placeholder within the zoslib.pc.in to replace extra flags and libs |
Co-authored-by: sachintu47 <[email protected]>
Added placeholders for extra flags and libs in commit eee0b89. The pkgconfig file now supports:
These can be set via CMake variables: cmake -DZOSLIB_EXTRA_CFLAGS=" -DDEFINE" -DZOSLIB_EXTRA_LIBS=" -lpthread" .. |
Co-authored-by: sachintu47 <[email protected]>
|
@copilot can this placeholder params be passed via argument |
Yes, these parameters can already be passed as command-line arguments using CMake's Direct cmake command: cmake .. -DZOSLIB_EXTRA_CFLAGS=" -DSOME_FLAG" -DZOSLIB_EXTRA_LIBS=" -lpthread"Via environment variables (alternative): export ZOSLIB_EXTRA_CFLAGS=" -DSOME_FLAG"
cmake ..With build.sh script: EXTRA_CMAKE_ARGS="-DZOSLIB_EXTRA_CFLAGS=' -DSOME_FLAG'" ./build.sh -rWould you like me to update build.sh to accept these as explicit command-line flags (e.g., |
Adds a standard pkg-config file to simplify library discovery and linking for downstream projects.
Changes
zoslib.pc.in: Template with standard metadata (name, version, libs, cflags) and customizable placeholders-DZOSLIB_OVERRIDE_CLIB=1 -DZOSLIB_OVERRIDE_CLIB_GETENV=1 -DZOSLIB_OVERRIDE_CLIB_LOCALE_FORCE-lzosliband${libdir}/celquopt.s.o@ZOSLIB_EXTRA_CFLAGS@,@ZOSLIB_EXTRA_LIBS@, and@ZOSLIB_PRIVATE_LIBS@CMakeLists.txt:lib/pkgconfig/README.md: Document pkg-config usage in Quick Start examples and list default flagsUsage
After installation, projects can now use:
The pkg-config file respects
CMAKE_INSTALL_PREFIXand provides standard--cflags,--libs, and--modversionqueries.Customization
Users can add extra flags and libraries via CMake variables:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.