[mapserver-dev] Building 7.2.0 with cmake 3.12
Bruno Friedmann
bruno at ioda-net.ch
Mon Jul 30 05:30:31 PDT 2018
Hi guys, trying to refresh my openSUSE package especially with our rolling
release Tumbleweed I'm facing some trouble in the configuration part
We have cmake 3.12., gcc-8.1.1+r262873
With cmake 3.12 it seems that part of mapserver CMakefile need a refresh
-- Found Perl: /usr/bin/perl (found version "5.26.2")
-- Found PerlLibs: /usr/lib/perl5/5.26.2/x86_64-linux-thread-multi/CORE/
libperl.so
CMake Deprecation Warning at /usr/share/cmake/Modules/UseSWIG.cmake:491
(message):
SWIG_ADD_MODULE is deprecated. Use SWIG_ADD_LIBRARY instead.
Call Stack (most recent call first):
mapscript/perl/CMakeLists.txt:12 (SWIG_ADD_MODULE)
CMake Error at mapscript/perl/CMakeLists.txt:21 (get_target_property):
The LOCATION property may not be read from target "perlmapscript". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.
first part (Deprecation Warning) it quite easy to fix with something like
diff -rup a/mapscript/python/CMakeLists.txt b/mapscript/python/CMakeLists.txt
--- a/mapscript/python/CMakeLists.txt 2018-07-24 16:35:29.000000000 +0200
+++ b/mapscript/python/CMakeLists.txt 2018-07-29 18:27:37.188557699 +0200
@@ -29,7 +29,13 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PAT
include_directories(${PROJECT_SOURCE_DIR}/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/mapscript/python)
-SWIG_ADD_MODULE(pythonmapscript python ../mapscript.i)
+if (${CMAKE_VERSION} VERSION_LESS "3.8.0")
+ SWIG_ADD_MODULE(pythonmapscript python ../mapscript.i)
+else()
+ SWIG_ADD_LIBRARY(pythonmapscript
+ LANGUAGE python
+ SOURCES ../mapscript.i)
+endif()
But I wonder if any of you have seen a fix (in similar project) for the Error
part. Any pointers would be really appreciate.
Of course, all of this will goes to an issue, and certainly a PR
--
Bruno Friedmann
Ioda-Net Sàrl www.ioda-net.ch
Bareos Partner, openSUSE Member, fsfe supporter
GPG KEY : D5C9B751C4653227
irc: tigerfoot
More information about the mapserver-dev
mailing list