-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add support for absolute CMAKE_INSTALL_*DIR #1
base: c_master
Are you sure you want to change the base?
Conversation
27e4695
to
bf1d18e
Compare
@@ -1,7 +1,6 @@ | |||
prefix=@prefix@ | |||
exec_prefix=@exec_prefix@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exec_prefix
は利用されていないかつ、どちらもCMAKE_INSTALL_PREFIX
を参照ているので必要ないと判断しました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
自分で「How to reproduce」にまとめている通り、 |
まずは、以下のケースに対応して
それが終わってから以下のケースに対応するのがいいんじゃないかな。
|
前者は↓で動くようになりませんか? diff --git a/msgpack-c.pc.in b/msgpack-c.pc.in
index 20806625..14806b7b 100644
--- a/msgpack-c.pc.in
+++ b/msgpack-c.pc.in
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
+libdir=${prefix}/@libdir@
+includedir=${prefix}/@includedir@
Name: MessagePack
Description: Binary-based efficient object serialization library |
レビューありがとうございます。
|
下記で完了したので、次は、絶対パスの対応をしたい。 |
Problem
The Current CMakeLists incorrectly configures
libdir
andincludedir
when CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR are absolute paths. And then it leads to incorrect paths in the generatedpkg-config
file.This misconfiguration prevents the compiler from finding necessary header files and library files.
How to reproduce
Expected
Solution
Adjust the
CMakeLists.txt
to correctly handle both relative and absolute paths for library and include directories. Update themsgpack-c.pc.in
file to use proper variables that respect the absolute path settings.