Repository navigation
CMake: preserve absolute pkg-config install directories - #264
Conversation
|
Fixed the regression in 14a9aed: its default build directory now sits outside the source tree, and CMake cache entries are read as UTF-8. The original root-directory command, |
|
The change to CMakeLists.txt looks fair to me. @madebr should look at the whole thing if he's able. |
| run: git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
| - name: Configure | ||
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE="Debug" -DBUILD_SHARED_LIBS=ON -DWAVPACK_BUILD_PROGRAMS=ON | ||
| - name: Check pkg-config install directories |
There was a problem hiding this comment.
This step runs CMake configuration again.
I think this does not need a test and only the CMakeLists.text change should be kept.
There was a problem hiding this comment.
Removed the configuration test and its CI/dist wiring in f463138. The PR now changes only the six lines in CMakeLists.txt. I kept the regression locally and reran the five directory configurations; all ten generated path fields pass.
|
Please squash your commits into a single one. |
Keep explicit absolute library and include paths in wavpack.pc while retaining prefix-relative paths for relative install directories.
|
Would a squash merge on your side work for keeping this as one commit? The final diff is now just the six-line CMakeLists.txt change. |
f463138 to
f1690e0
Compare
|
Squashed the three commits into f1690e0. The diff is unchanged: only six added lines in CMakeLists.txt. I reran all five pkg-config directory configurations, the Debug build, and CTest (wvtest); all passed. |
Problem
When
CMAKE_INSTALL_LIBDIRorCMAKE_INSTALL_INCLUDEDIRis absolute, CMake installs to that directory butwavpack.pcprepends${prefix}/. For example, prefix/tmp/wv-prefixand libdir/tmp/wv-libincorrectly produce/tmp/wv-prefix//tmp/wv-lib, so downstream pkg-config consumers cannot find the installed files.Change
Keep absolute values when generating the
.pcfile and retain the existing${prefix}expressions for relative values. The final diff contains only six conditional lines inCMakeLists.txt, following the review request to omit the configuration test and its CI/distribution wiring.Validation
After the scope reduction, five local CMake configuration cases pass: default, custom relative, absolute library only, absolute include only, and both absolute directories. All ten generated lib/include fields match the actual configured paths.
git diff --checkpasses, and the aggregate diff against b6485a3 contains onlyCMakeLists.txt(+6/-0).Earlier validation of this unchanged CMake production change included installed static consumers, relative prefix overrides, the pkg-config-module-off option, and the enabled program/CTest builds. After squashing, a fresh Linux Debug build with programs and
BUILD_TESTINGenabled also passes, and CTest passeswvtest(1/1). The full source tree is identical to the previous three-commit head. The regression is retained privately for verification and is no longer part of this PR. Windows and macOS were not run locally; current remote CI is separate.