[geos-commits] [SCM] GEOS branch master updated. 43959918201670cd1e72913cf4cffb07b4666708

git at osgeo.org git at osgeo.org
Wed Mar 27 03:56:45 PDT 2019


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, master has been updated
       via  43959918201670cd1e72913cf4cffb07b4666708 (commit)
      from  5edcac067943816b518831beccfa680559706eb5 (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 43959918201670cd1e72913cf4cffb07b4666708
Author: Kirill Kouzoubov <kirill888 at gmail.com>
Date:   Tue Mar 26 20:47:47 2019 +1100

    Link against static lib if shared lib is disabled
    
    Create "interface" targets for "geos" and "geos_c" that redirect to
    "geos-static" target if shared libs are not being built.

diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt
index 633fff8..b388b55 100644
--- a/capi/CMakeLists.txt
+++ b/capi/CMakeLists.txt
@@ -42,6 +42,9 @@ if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
 
   add_dependencies(geos_c geos_revision)
 
+else()
+  add_library(geos_c INTERFACE)
+  target_link_libraries(geos_c INTERFACE geos-static)
 endif()
 
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ad50d2d..5a7c7b5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -104,6 +104,11 @@ else()
 
   endif()
 
+  if(NOT GEOS_BUILD_SHARED)
+    add_library(geos INTERFACE)
+    target_link_libraries(geos INTERFACE geos-static)
+  endif()
+
 endif() # (GEOS_ENABLE_MACOSX_FRAMEWORK)
 
 # if(APPLE)

-----------------------------------------------------------------------

Summary of changes:
 capi/CMakeLists.txt | 3 +++
 src/CMakeLists.txt  | 5 +++++
 2 files changed, 8 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list