Skip to content
Permalink
Browse files

Allow SWIG modules to be built with old or new versions of CMake

  • Loading branch information...
geographika committed Jun 27, 2018
1 parent bab65ad commit 609db8c32da29d4818f70dcfe7ead2f84a7b2150
Showing with 6 additions and 1 deletion.
  1. +6 −1 mapscript/python/CMakeLists.txt
@@ -28,7 +28,12 @@ include_directories(${PROJECT_SOURCE_DIR}/mapscript/swiginc)
include_directories(${PROJECT_SOURCE_DIR}/mapscript/)
include_directories(${PROJECT_SOURCE_DIR}/mapscript/python)

swig_add_library(pythonmapscript TYPE MODULE LANGUAGE python SOURCES ../mapscript.i)
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} greater 3.7)
swig_add_library(pythonmapscript TYPE MODULE LANGUAGE python SOURCES ../mapscript.i)
else (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} greater 3.7)
swig_add_module(pythonmapscript python ../mapscript.i)
endif (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} greater 3.7)

swig_link_libraries(pythonmapscript ${PYTHON_LIBRARIES} ${MAPSERVER_LIBMAPSERVER})

set_target_properties(${SWIG_MODULE_pythonmapscript_REAL_NAME} PROPERTIES PREFIX "")

0 comments on commit 609db8c

Please sign in to comment.
You can’t perform that action at this time.