astitcher commented on a change in pull request #335:
URL: https://github.com/apache/qpid-proton/pull/335#discussion_r739428529
##########
File path: c/src/libqpid-proton.pc.in
##########
@@ -17,10 +17,10 @@
* under the License.
*/
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${prefix}/@INCLUDEDIR@
+includedir=${prefix}/@LIBDIR@
Review comment:
And again?
##########
File path: CMakeLists.txt
##########
@@ -276,18 +276,18 @@ set (MAN_INSTALL_DIR share/man CACHE PATH "Manpage
directory")
mark_as_advanced (INCLUDE_INSTALL_DIR LIB_INSTALL_DIR SYSCONF_INSTALL_DIR
SHARE_INSTALL_DIR MAN_INSTALL_DIR)
-# ${PACKAGE_PREFIX_DIR} is expanded from @PACKAGE_INIT@
-# by configure_package_config_file(), and available in ProtonConfig.cmake
-macro (pn_relative_install_dir NAME VALUE)
+# Sets variable NAME to contain relative path from ROOT to VALUE
+# if VALUE is already relative, it does nothing
+macro (pn_relative_install_dir NAME ROOT VALUE)
if (IS_ABSOLUTE ${VALUE})
- message(WARNING "Build was given an absolute path '${VALUE}'. As a result,
`make DESTDIR=... install` will not work.")
- set (${NAME} "${VALUE}")
+ file(RELATIVE_PATH "${NAME}" "${ROOT}" "${VALUE}")
else ()
- set (${NAME} "\${PACKAGE_PREFIX_DIR}/${VALUE}")
+ set (${NAME} "${VALUE}")
endif ()
endmacro ()
-pn_relative_install_dir (INCLUDEDIR ${INCLUDE_INSTALL_DIR})
+pn_relative_install_dir (INCLUDEDIR "${CMAKE_INSTALL_PREFIX}"
"${INCLUDE_INSTALL_DIR}")
+pn_relative_install_dir (LIBDIR "${CMAKE_INSTALL_PREFIX}" "${LIB_INSTALL_DIR}")
Review comment:
We need to be a little careful with INCLUDEDIR LIBDIR (and maybe some
others as well as they can be overridden on the rpm build line and in that case
I pretty sure they have the meaning of just the name relative to the prefix.
##########
File path: c/src/libqpid-proton-core.pc.in
##########
@@ -17,10 +17,10 @@
* under the License.
*/
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
Review comment:
Are you sure that prefix and exe_prefix should be the same?
##########
File path: c/src/libqpid-proton-proactor.pc.in
##########
@@ -17,10 +17,10 @@
* under the License.
*/
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${prefix}/@INCLUDEDIR@
+includedir=${prefix}/@LIBDIR@
Review comment:
Backwards again?
##########
File path: cpp/libqpid-proton-cpp.pc.in
##########
@@ -17,10 +17,10 @@
* under the License.
*/
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${prefix}/@INCLUDEDIR@
+includedir=${prefix}/@LIBDIR@
Review comment:
And again? !!
##########
File path: c/src/libqpid-proton-core.pc.in
##########
@@ -17,10 +17,10 @@
* under the License.
*/
-prefix=@PREFIX@
-exec_prefix=@EXEC_PREFIX@
-libdir=@LIBDIR@
-includedir=@INCLUDEDIR@
+prefix=${pcfiledir}/../..
+exec_prefix=${prefix}
+libdir=${prefix}/@INCLUDEDIR@
+includedir=${prefix}/@LIBDIR@
Review comment:
These seems to be backwards?
libdir ... @INCLUDEDIR@
includedir ... @LIBDIR@
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]