Skip to content

Commit

Permalink
Merge pull request #6527 from rouault/fix_mapscript_python
Browse files Browse the repository at this point in the history
CMake: fix recent issue with mapscript python
  • Loading branch information
rouault committed May 16, 2022
2 parents 91c550c + 37a302d commit 944aa1b
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions mapscript/python/CMakeLists.txt
Expand Up @@ -60,7 +60,7 @@ add_custom_target(
)

add_custom_command(
DEPENDS ${SWIG_MODULE_pythonmapscript_REAL_NAME} pythonmapscript_copyfiles
DEPENDS ${SWIG_MODULE_pythonmapscript_REAL_NAME}
OUTPUT mapscriptvenv.stamp
WORKING_DIRECTORY ${OUTPUT_FOLDER}
COMMAND ${Python_EXECUTABLE} -m pip install pip --upgrade
Expand Down Expand Up @@ -103,7 +103,7 @@ add_custom_command(
)

add_custom_command(
OUTPUT mapscriptcopyfiles.stamp
TARGET ${SWIG_MODULE_pythonmapscript_REAL_NAME}
WORKING_DIRECTORY ${OUTPUT_FOLDER}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/mapscript/python/mapscript/__init__.py" $<TARGET_FILE_DIR:${SWIG_MODULE_pythonmapscript_REAL_NAME}>/mapscript/__init__.py
Expand All @@ -116,12 +116,6 @@ add_custom_command(
COMMENT "Copying files required to build Mapscript"
)

# handle CMake CMP0040 policy error
add_custom_target(
pythonmapscript_copyfiles
DEPENDS mapscriptcopyfiles.stamp
)

install(
CODE "
Expand Down

0 comments on commit 944aa1b

Please sign in to comment.