Commit 6c02571f authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: fix geos 3.5.0 build

parent 5fefde68
......@@ -3,18 +3,18 @@ INCLUDE_ONCE_MACRO(GEOS)
SETUP_SUPERBUILD(GEOS)
if(MSVC)
set(GEOS_PATCH_COMMAND ${CMAKE_COMMAND} -E copy
set(GEOS_PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/patches/GEOS/CMakeLists.txt
${CMAKE_SOURCE_DIR}/patches/GEOS/nmake.opt
${GEOS_SB_SRC})
set(GEOS_CMAKE_COMMAND ${SB_CMAKE_COMMAND} -DGEOS_SB_SRC=${GEOS_SB_SRC})
else()
set(GEOS_PATCH_COMMAND)
set(GEOS_CMAKE_COMMAND ${SB_CMAKE_COMMAND})
endif()
ExternalProject_Add(GEOS
......@@ -27,12 +27,13 @@ ExternalProject_Add(GEOS
DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
CMAKE_CACHE_ARGS
${SB_CMAKE_CACHE_ARGS}
-DGEOS_ENABLE_TESTS:BOOL=OFF
PATCH_COMMAND ${GEOS_PATCH_COMMAND}
CMAKE_COMMAND ${GEOS_CMAKE_COMMAND}
)
SUPERBUILD_PATCH_SOURCE(GEOS)
set(_SB_GEOS_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
if(WIN32)
set(_SB_GEOS_LIBRARY ${SB_INSTALL_PREFIX}/lib/geos_i.lib )
......
diff -burN geos-3.5.0.orig/CMakeLists.txt geos-3.5.0/CMakeLists.txt
--- geos-3.5.0.orig/CMakeLists.txt 2016-09-02 11:02:28.833742143 +0200
+++ geos-3.5.0/CMakeLists.txt 2016-09-02 11:05:05.897748116 +0200
@@ -55,6 +55,9 @@
# Check custom global options
#################################################################################
+option(GEOS_BUILD_STATIC
+ "Set to OFF|ON (default) to control build of GEOS tests package" OFF)
+
option(GEOS_ENABLE_TESTS
"Set to OFF|ON (default) to control build of GEOS tests package" ON)
@@ -317,18 +320,18 @@
# Define "make check" as alias for "make test"
add_custom_target(check COMMAND ctest)
-
+add_subdirectory(tests)
endif()
#################################################################################
# Configure subdirectories
#################################################################################
-include(GenerateSourceGroups)
+#include(GenerateSourceGroups)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(capi)
-add_subdirectory(tests)
+
add_subdirectory(tools)
#################################################################################
diff -burN geos-3.5.0.orig/include/CMakeLists.txt geos-3.5.0/include/CMakeLists.txt
--- geos-3.5.0.orig/include/CMakeLists.txt 2016-09-02 11:02:28.837742143 +0200
+++ geos-3.5.0/include/CMakeLists.txt 2016-09-02 11:03:03.581743464 +0200
@@ -54,4 +54,4 @@
#################################################################################
# Group source files for IDE source explorers (e.g. Visual Studio)
#################################################################################
-GenerateSourceGroups(include)
+#GenerateSourceGroups(include)
diff -burN geos-3.5.0.orig/src/CMakeLists.txt geos-3.5.0/src/CMakeLists.txt
--- geos-3.5.0.orig/src/CMakeLists.txt 2016-09-02 11:02:28.869742144 +0200
+++ geos-3.5.0/src/CMakeLists.txt 2016-09-02 11:05:14.621748447 +0200
@@ -62,7 +62,18 @@
else()
add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS})
+ if(GEOS_BUILD_STATIC)
add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
+ set_target_properties(geos-static
+ PROPERTIES
+ OUTPUT_NAME "geos"
+ PREFIX "lib"
+ CLEAN_DIRECT_OUTPUT 1)
+ install(TARGETS geos geos-static
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+endif()
set_target_properties(geos
PROPERTIES
@@ -70,11 +81,6 @@
VERSION ${VERSION}
CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(geos-static
- PROPERTIES
- OUTPUT_NAME "geos"
- PREFIX "lib"
- CLEAN_DIRECT_OUTPUT 1)
endif()
@@ -90,7 +96,7 @@
#################################################################################
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
- install(TARGETS geos geos-static
+ install(TARGETS geos
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
@@ -99,4 +105,4 @@
#################################################################################
# Group source files for IDE source explorers (e.g. Visual Studio)
#################################################################################
-GenerateSourceGroups(src)
+#GenerateSourceGroups(src)
diff -burN geos-3.4.2.orig/src/CMakeLists.txt geos-3.4.2/src/CMakeLists.txt
--- geos-3.4.2.orig/src/CMakeLists.txt 2016-07-01 14:07:05.000000000 +0200
+++ geos-3.4.2/src/CMakeLists.txt 2016-07-01 14:07:39.000000000 +0200
@@ -62,7 +62,7 @@
else()
add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS})
- add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
+# add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
set_target_properties(geos
PROPERTIES
@@ -70,11 +70,11 @@
VERSION ${VERSION}
CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(geos-static
- PROPERTIES
- OUTPUT_NAME "geos"
- PREFIX "lib"
- CLEAN_DIRECT_OUTPUT 1)
+# set_target_properties(geos-static
+# PROPERTIES
+# OUTPUT_NAME "geos"
+# PREFIX "lib"
+# CLEAN_DIRECT_OUTPUT 1)
endif()
@@ -90,7 +90,7 @@
#################################################################################
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
- install(TARGETS geos geos-static
+ install(TARGETS geos
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
diff -burN geos-3.4.2.orig/src/CMakeLists.txt geos-3.4.2/src/CMakeLists.txt
--- geos-3.4.2.orig/src/CMakeLists.txt 2016-07-01 14:07:05.000000000 +0200
+++ geos-3.4.2/src/CMakeLists.txt 2016-07-01 14:07:39.000000000 +0200
@@ -62,7 +62,7 @@
else()
add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS})
- add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
+# add_library(geos-static STATIC ${geos_SOURCES} ${geos_ALL_HEADERS})
set_target_properties(geos
PROPERTIES
@@ -70,11 +70,11 @@
VERSION ${VERSION}
CLEAN_DIRECT_OUTPUT 1)
- set_target_properties(geos-static
- PROPERTIES
- OUTPUT_NAME "geos"
- PREFIX "lib"
- CLEAN_DIRECT_OUTPUT 1)
+# set_target_properties(geos-static
+# PROPERTIES
+# OUTPUT_NAME "geos"
+# PREFIX "lib"
+# CLEAN_DIRECT_OUTPUT 1)
endif()
@@ -90,7 +90,7 @@
#################################################################################
if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
- install(TARGETS geos geos-static
+ install(TARGETS geos
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment