Skip to content

Commit

Permalink
Merge pull request jrl-umi3218#392 from jcarpent/master
Browse files Browse the repository at this point in the history
Fix windows issue on target name
  • Loading branch information
jcarpent authored May 28, 2020
2 parents 9d9fda1 + 2f96c84 commit e715bf7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -387,14 +387,14 @@ ENDMACRO()
# Build a Python file from the source directory in the build directory.
#
MACRO(PYTHON_BUILD MODULE FILE)

IF(NOT TARGET compile_pyc)
ADD_CUSTOM_TARGET(compile_pyc ALL)
ENDIF()
FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${MODULE}")

# convert "/" to "_"
STRING(REGEX REPLACE "/|:" "_" FILE_TARGET_NAME
"${CMAKE_CURRENT_BINARY_DIR}/${MODULE}/${FILE}c")

ADD_CUSTOM_TARGET(${FILE_TARGET_NAME} ALL
ADD_CUSTOM_COMMAND(
TARGET compile_pyc
PRE_BUILD
COMMAND
"${PYTHON_EXECUTABLE}"
"${PROJECT_SOURCE_DIR}/cmake/compile.py"
Expand Down

0 comments on commit e715bf7

Please sign in to comment.