[geos-commits] [SCM] GEOS branch svn-3.6 updated. 33abb846d7e4a687a70c1ddc4d601060a71f0e8a
git at osgeo.org
git at osgeo.org
Mon Jan 28 14:28:41 PST 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, svn-3.6 has been updated
via 33abb846d7e4a687a70c1ddc4d601060a71f0e8a (commit)
from 287b45da2cbaaa70fc27c333b496e02bd161b1d4 (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 33abb846d7e4a687a70c1ddc4d601060a71f0e8a
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Jan 28 14:28:29 2019 -0800
Static library does not contain C API
Closes #878
diff --git a/NEWS b/NEWS
index cba7eb7..07b0462 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Changes in 3.6.4
- Envelope constructor use strtod (#875)
- Polygon build failure in Overlay difference (#789 Paul Ramsey)
- Invalid union result from valid polygon inputs (#838)
+ - Static library does not contain C API (#878)
Changes in 3.6.3
diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt
index 859722b..0607b16 100644
--- a/capi/CMakeLists.txt
+++ b/capi/CMakeLists.txt
@@ -6,7 +6,7 @@
#
# This is free software; you can redistribute and/or modify it under
# the terms of the GNU Lesser General Public Licence as published
-# by the Free Software Foundation.
+# by the Free Software Foundation.
# See the COPYING file for more information.
#
#################################################################################
@@ -21,9 +21,9 @@ set(geos_c_SOURCES
file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue
-if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
- # if building OS X framework, CAPI built into C++ library
- add_library(geos_c SHARED ${geos_c_SOURCES})
+if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
+ # if building OS X framework or only building static libs, CAPI built into C++ library)
+ add_library(geos_c SHARED ${geos_c_SOURCES})
target_link_libraries(geos_c geos)
@@ -55,7 +55,7 @@ else()
DESTINATION include)
endif()
-if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
+if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
install(TARGETS geos_c
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4a1e688..3894a56 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -6,7 +6,7 @@
#
# This is free software; you can redistribute and/or modify it under
# the terms of the GNU Lesser General Public Licence as published
-# by the Free Software Foundation.
+# by the Free Software Foundation.
# See the COPYING file for more information.
#
#################################################################################
@@ -14,25 +14,26 @@
file(GLOB_RECURSE geos_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
file(GLOB_RECURSE geos_ALL_HEADERS ${CMAKE_SOURCE_DIR}/include/*.h) # fix source_group issue
+# Include CAPI in OS X framework binary and in static libs
+set(geos_c_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp)
+
if(GEOS_ENABLE_MACOSX_FRAMEWORK)
# OS X frameworks don't have static libs
# also 1 binary, so include CAPI here
# and, make name all caps
- set(geos_c_SOURCES
- ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_c.cpp
- ${CMAKE_CURRENT_SOURCE_DIR}/../capi/geos_ts_c.cpp)
-
add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES})
- math(EXPR CVERSION "${VERSION_MAJOR} + 1")
- # VERSION = current version, SOVERSION = compatibility version
+ math(EXPR CVERSION "${VERSION_MAJOR} + 1")
+ # VERSION = current version, SOVERSION = compatibility version
set_target_properties(GEOS
PROPERTIES
CLEAN_DIRECT_OUTPUT 1
FRAMEWORK 1
- VERSION "${CVERSION}.${VERSION_MINOR}.${VERSION_PATCH}"
- SOVERSION ${CVERSION}
+ VERSION "${CVERSION}.${VERSION_MINOR}.${VERSION_PATCH}"
+ SOVERSION ${CVERSION}
FRAMEWORK_VERSION ${VERSION_MAJOR}
BUILD_WITH_INSTALL_RPATH TRUE
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}"
@@ -77,7 +78,8 @@ else()
endif()
if(GEOS_BUILD_STATIC)
- add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
+ file(GLOB geos_capi_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../capi/*.h) # fix source_group issue
+ add_library(geos-static STATIC ${geos_SOURCES} ${geos_c_SOURCES} ${geos_ALL_HEADERS} ${geos_capi_HEADERS})
set_target_properties(geos-static
PROPERTIES
-----------------------------------------------------------------------
Summary of changes:
NEWS | 1 +
capi/CMakeLists.txt | 10 +++++-----
src/CMakeLists.txt | 22 ++++++++++++----------
3 files changed, 18 insertions(+), 15 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list