Skip to content

Commit

Permalink
Allow SWIG modules to be built with old or new versions of CMake
Browse files Browse the repository at this point in the history
  • Loading branch information
geographika committed Jun 27, 2018
1 parent bab65ad commit 609db8c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mapscript/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down

0 comments on commit 609db8c

Please sign in to comment.