Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz Tick-tock Python Libs : gz-math #466

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/python_pybind11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,20 @@ function(configure_build_install_location _library_name)
# Install Python library symlinks
if(${GZ_PYTHON_INSTALL_PATH} MATCHES "gz$")
cmake_policy(SET CMP0087 NEW) # Allow evaluation of generator expressions in install(CODE )
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/ignition")

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 \
${CMAKE_INSTALL_PREFIX}\/${GZ_PYTHON_INSTALL_PATH}\/$<TARGET_FILE_NAME:${_library_name}> \
${PROJECT_BINARY_DIR}\/$<TARGET_FILE_NAME:${_library_name}>)")
../gz/${GZ_PYTHON_INSTALL_PATH}\/$<TARGET_FILE_NAME:${_library_name}> \
${PROJECT_BINARY_DIR}\/ignition/$<TARGET_FILE_NAME:${_library_name}>)")
else()
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \
${CMAKE_INSTALL_PREFIX}\/${GZ_PYTHON_INSTALL_PATH}\/$<TARGET_FILE_NAME:${_library_name}> \
${PROJECT_BINARY_DIR}\/$<TARGET_FILE_NAME:${_library_name}>)")
../gz/$<TARGET_FILE_NAME:${_library_name}> \
${PROJECT_BINARY_DIR}\/ignition/$<TARGET_FILE_NAME:${_library_name}>)")
endif()

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