blob: 37e8d821f1293e8f91993c53a6a020707ee9c4ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1265,13 +1265,13 @@ target_link_libraries(${PACKAGE_NAME} PRIVATE ocpn::sqlite)
add_subdirectory("libs/SQLiteCpp")
target_link_libraries(${PACKAGE_NAME} PRIVATE ocpn::sqlite_cpp)
-find_package(Shapelib)
-if (SHAPELIB_FOUND)
- message(STATUS "Using system shapelib")
-else ()
- message(STATUS "Using bundled shapelib")
- add_subdirectory("libs/shapelib")
-endif ()
+#find_package(Shapelib)
+#if (SHAPELIB_FOUND)
+# message(STATUS "Using system shapelib")
+#else ()
+message(STATUS "Using bundled shapelib")
+add_subdirectory("libs/shapelib")
+#endif ()
target_link_libraries(${PACKAGE_NAME} PRIVATE shapelib::shapelib)
add_subdirectory("libs/ShapefileCpp")
--- a/libs/shapelib/CMakeLists.txt
+++ b/libs/shapelib/CMakeLists.txt
@@ -170,7 +170,7 @@ if(MSVC)
set(BUILD_TESTING OFF CACHE BOOL "")
else()
# TODO(schwehr): Temporary work around.
- cmake_policy(SET CMP0026 OLD)
+ ## cmake_policy(SET CMP0026 OLD) we don't build tests anyway
endif()
find_program(BASH_EXECUTABLE bash)
@@ -181,7 +181,8 @@ else()
message(STATUS "WARNING: sed or bash not available so disabling testing")
endif()
-set(BUILD_TESTING OFF)
+set(BUILD_TESTING OFF) ## Quick hack to avoid building test code
+cmake_policy(SET CMP0026 NEW) ## Test code need needs OLD
# For the first series of tests, the user needs to have downloaded
# from http://dl.maptools.org/dl/shapelib/shape_eg_data.zip, unpacked
|