[geos-commits] [SCM] GEOS branch main updated. 8cf761b4d77b1261e0f6673c6716adb2daee7eb1
git at osgeo.org
git at osgeo.org
Thu Nov 9 13:43:33 PST 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, main has been updated
via 8cf761b4d77b1261e0f6673c6716adb2daee7eb1 (commit)
from cb0550a181a2beb4c44ff0f6eabb2b91ae15da1c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8cf761b4d77b1261e0f6673c6716adb2daee7eb1
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Thu Nov 9 13:16:38 2023 -0800
For XCode 15, the dyld linker behaviour changed and
no longer automatically falls back to checking
the contents of /usr/local/lib when trying to
evaluate an @rpath dependency. As a result,
runtime linking is failing on up-to-date MacOS
systems. The INSTALL_NAME_DIR directive is used
for APPLE builds, to ensure that the installed
library advertises its install path, so libraries
that link to it can find it again when dynamic
linking time arrives.
https://stackoverflow.com/questions/77137284/dynamic-linker-fails-to-find-symbol-at-runtime-after-updating-to-xcode-15
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5537d0c1..4c522752e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -300,6 +300,12 @@ add_library(GEOS::geos ALIAS geos)
target_link_libraries(geos PUBLIC geos_cxx_flags PRIVATE $<BUILD_INTERFACE:ryu>)
# ryu is an object library, nothing is actually being linked here. The BUILD_INTERFACE
# switch was necessary to build on AppVeyor (CMake 3.16.2) but not locally (CMake 3.16.3)
+
+if(APPLE AND BUILD_SHARED_LIBS)
+ set_target_properties(geos PROPERTIES
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+
add_subdirectory(include)
add_subdirectory(src)
@@ -326,6 +332,11 @@ add_library(geos_c "")
add_library(GEOS::geos_c ALIAS geos_c)
target_link_libraries(geos_c PRIVATE geos)
+if(APPLE AND BUILD_SHARED_LIBS)
+ set_target_properties(geos_c PROPERTIES
+ INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
+endif()
+
if(BUILD_SHARED_LIBS)
target_compile_definitions(geos_c
PRIVATE $<$<BOOL:${WIN32}>:GEOS_DLL_EXPORT>)
diff --git a/examples/capi_indexed_predicate b/examples/capi_indexed_predicate
new file mode 100755
index 000000000..9b52241cc
Binary files /dev/null and b/examples/capi_indexed_predicate differ
diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt
index f909916f4..4d52c11d9 100644
--- a/util/CMakeLists.txt
+++ b/util/CMakeLists.txt
@@ -10,21 +10,8 @@
################################################################################
option(BUILD_GEOSOP "Build geosop command-line interface" ON)
-
message(STATUS "GEOS: Build geosop ${BUILD_GEOSOP}")
if(BUILD_GEOSOP)
- if(BUILD_SHARED_LIBS)
- if(NOT DEFINED CMAKE_INSTALL_RPATH)
- # Use relative rpath
- if(APPLE)
- set(CMAKE_INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}")
- else()
- set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
- endif()
- endif()
- message(STATUS "GEOS: install runtime path for util: ${CMAKE_INSTALL_RPATH}")
- endif()
-
add_subdirectory(geosop)
endif()
diff --git a/util/geosop/CMakeLists.txt b/util/geosop/CMakeLists.txt
index 744c354b0..165727460 100644
--- a/util/geosop/CMakeLists.txt
+++ b/util/geosop/CMakeLists.txt
@@ -19,3 +19,18 @@ target_link_libraries(geosop PRIVATE geos geos_c)
install(TARGETS geosop
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
+
+if(BUILD_SHARED_LIBS)
+ if(NOT DEFINED CMAKE_INSTALL_RPATH)
+ # Use relative rpath
+ if(APPLE)
+ set_target_properties(geosop PROPERTIES
+ INSTALL_RPATH "@loader_path/../${CMAKE_INSTALL_LIBDIR}")
+ else()
+ set_target_properties(geosop PROPERTIES
+ INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
+ endif()
+ endif()
+endif()
+
+
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 11 +++++++++++
examples/capi_indexed_predicate | Bin 0 -> 35219 bytes
util/CMakeLists.txt | 13 -------------
util/geosop/CMakeLists.txt | 15 +++++++++++++++
4 files changed, 26 insertions(+), 13 deletions(-)
create mode 100755 examples/capi_indexed_predicate
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list