This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
     new 96782bc  PROTON-2254 Allow absolute -DINCLUDE_INSTALL_DIR= (#329)
96782bc is described below

commit 96782bc39fcf36446a7ccb91ff06e0cca1f60a8b
Author: Jiri Daněk <jda...@redhat.com>
AuthorDate: Thu Aug 12 22:44:06 2021 +0200

    PROTON-2254 Allow absolute -DINCLUDE_INSTALL_DIR= (#329)
---
 CMakeLists.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3aef3b0..0eb169a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -280,10 +280,11 @@ mark_as_advanced (INCLUDE_INSTALL_DIR LIB_INSTALL_DIR 
SYSCONF_INSTALL_DIR SHARE_
 # by configure_package_config_file(), and available in ProtonConfig.cmake
 macro (pn_relative_install_dir NAME VALUE)
   if (IS_ABSOLUTE ${VALUE})
-    message(FATAL_ERROR "pn_relative_install_dir requires relative directory")
+    message(WARNING "Build was given an absolute path '${VALUE}'. As a result, 
`make DESTDIR=... install` will not work.")
+    set (${NAME} "${VALUE}")
+  else ()
+    set (${NAME} "\${PACKAGE_PREFIX_DIR}/${VALUE}")
   endif ()
-
-  set (${NAME} "\${PACKAGE_PREFIX_DIR}/${VALUE}")
 endmacro ()
 
 pn_relative_install_dir (INCLUDEDIR ${INCLUDE_INSTALL_DIR})

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to