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

${CMAKE_INSTALL_LIBDIR} not respected for *.pc files #931

Closed
Arfrever opened this issue Apr 4, 2021 · 1 comment
Closed

${CMAKE_INSTALL_LIBDIR} not respected for *.pc files #931

Arfrever opened this issue Apr 4, 2021 · 1 comment
Assignees
Labels

Comments

@Arfrever
Copy link

Arfrever commented Apr 4, 2021

*.pc files, similarly to libraries and cmake configuration files, should be installed in directory respecting ${CMAKE_INSTALL_LIBDIR} (which is /usr/lib64 on most 64-bit distributions) instead of hardcoded ${CMAKE_INSTALL_PREFIX}/lib.

Fix:

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -181,7 +181,7 @@
 Libs: -L\${libdir} $<JOIN:${ABSL_CC_LIB_LINKOPTS}, > $<$<NOT:$<BOOL:${ABSL_CC_LIB_IS_INTERFACE}>>:-labsl_${_NAME}>\n\
 Cflags: -I\${includedir}${PC_CFLAGS}\n")
       INSTALL(FILES "${CMAKE_BINARY_DIR}/lib/pkgconfig/absl_${_NAME}.pc"
-              DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
+              DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
     endif()
   endif()
 
@Arfrever Arfrever added the bug label Apr 4, 2021
@derekmauro
Copy link
Member

Thanks for letting us know. I will patch this issue.

@derekmauro derekmauro self-assigned this Apr 5, 2021
derekmauro added a commit to derekmauro/abseil-cpp that referenced this issue Apr 20, 2021
derekmauro added a commit that referenced this issue Apr 20, 2021
* Add missing `add_subdirectory()` call for "cleanup" (#925)

Since `absl::Cleanup` is now public, it should also be included
in the `absl/CMakeLists.txt` file.

Signed-off-by: Christian Blichmann <[email protected]>

* Correctly install pkgconfig files under CMAKE_INSTALL_LIBDIR
Fixes #931

PiperOrigin-RevId: 366816645

* AbseilConfigureCopts.cmake: fix AppleClang detection

restore use of MATCHES in comparison with "Clang"; this was lost in:

commit 22771d4
  ...
  24e1f5f72756046f5265abf618e951c341f09b8d by Derek Mauro <[email protected]>:

  Fixes failing CMake string comparisons
  https://cmake.org/cmake/help/latest/policy/CMP0054.html

fixes:
CMake Warning at absl/copts/AbseilConfigureCopts.cmake:61 (message):
  Unknown compiler:
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++.
  Building with no default flags

Fixes #930

PiperOrigin-RevId: 366879337

* Increment SOVERSION to 2103.0.1

Co-authored-by: Christian Blichmann <[email protected]>
Co-authored-by: Abseil Team <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants