[mapguide-commits] r9721 - trunk/MgDev/Web/src/ApacheAgent

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Aug 24 05:39:12 PDT 2020


Author: jng
Date: 2020-08-24 05:39:12 -0700 (Mon, 24 Aug 2020)
New Revision: 9721

Modified:
   trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt
Log:
Fix RPATH for mod_mgmapagent.so in CMake build. Fixes #2815

Modified: trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt
===================================================================
--- trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt	2020-08-18 16:23:44 UTC (rev 9720)
+++ trunk/MgDev/Web/src/ApacheAgent/CMakeLists.txt	2020-08-24 12:39:12 UTC (rev 9721)
@@ -51,8 +51,14 @@
 set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES PREFIX "")
 
 # Set RPATH to avoid needing to use LD_LIBRARY_PATH in various configs
+# NOTE: Unlike other libs, the expected load context is from $INSTALL/webserverextensions/apache2/modules
+# Thus we need the RPATH to be $ORIGIN:$ORIGIN/../../lib[64]:$ORIGIN/../../../lib[64] so that this resolves to:
+#
+#  * $INSTALL/webserverextensions/apache2/modules
+#  * $INSTALL/webserverextensions/lib64 [this is where webtier libs reside]
+#  * $INSTALL/lib64 [this is where the common libs reside]
 if(MG_CPU EQUAL 64)
-    set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64")
+    set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib64:$ORIGIN/../../../lib64")
 else(MG_CPU EQUAL 64)
-    set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib")
+    set_target_properties(mod_mgmapagent${MG_VERSION_SUFFIX} PROPERTIES INSTALL_RPATH "$ORIGIN:$ORIGIN/../../lib:$ORIGIN/../../../lib")
 endif(MG_CPU EQUAL 64)
\ No newline at end of file



More information about the mapguide-commits mailing list