Skip to content

Commit

Permalink
Fixed python build in gz-sim7 (gazebosim#1667)
Browse files Browse the repository at this point in the history
Signed-off-by: ahcorde <[email protected]>

Signed-off-by: ahcorde <[email protected]>
  • Loading branch information
ahcorde authored Aug 30, 2022
1 parent fae7e64 commit fc62666
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,17 @@ function(configure_build_install_location _library_name)

string(REGEX REPLACE "gz$" "ignition" IGN_PYTHON_INSTALL_PATH ${GZ_PYTHON_INSTALL_PATH})
if (WIN32) # Windows requires copy instead of symlink
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy \
../gz/${GZ_PYTHON_INSTALL_PATH}\/$<TARGET_FILE_NAME:${_library_name}> \
${PROJECT_BINARY_DIR}\/ignition/$<TARGET_FILE_NAME:${_library_name}>)")
install(TARGETS ${_library_name}
DESTINATION "${IGN_PYTHON_INSTALL_PATH}"
)
else()
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
../gz/$<TARGET_FILE_NAME:${_library_name}> \
${PROJECT_BINARY_DIR}\/ignition/$<TARGET_FILE_NAME:${_library_name}>)")
install(FILES ${PROJECT_BINARY_DIR}\/ignition/$<TARGET_FILE_NAME:${_library_name}>
DESTINATION "${IGN_PYTHON_INSTALL_PATH}/"
)
endif()

install(FILES ${PROJECT_BINARY_DIR}\/ignition/$<TARGET_FILE_NAME:${_library_name}>
DESTINATION "${IGN_PYTHON_INSTALL_PATH}/"
)
endif()

endfunction()
Expand Down

0 comments on commit fc62666

Please sign in to comment.