Skip to content

Commit

Permalink
Do not redefine CMAKE_INSTALL_PYTHONDIR if it is already defined (#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Nov 16, 2023
1 parent aee6771 commit 23f59fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ if(CREATE_PYTHON)
OUTPUT_STRIP_TRAILING_WHITESPACE)

set(_CMAKE_INSTALL_PYTHONDIR "${PYTHON_INSTDIR}")
set(CMAKE_INSTALL_PYTHONDIR ${_CMAKE_INSTALL_PYTHONDIR} CACHE PATH "python bindings (${_CMAKE_INSTALL_PYTHONDIR})")
mark_as_advanced(CMAKE_INSTALL_PYTHONDIR)
if(NOT DEFINED CMAKE_INSTALL_PYTHONDIR)
set(CMAKE_INSTALL_PYTHONDIR ${_CMAKE_INSTALL_PYTHONDIR} CACHE PATH "python bindings (${_CMAKE_INSTALL_PYTHONDIR})")
mark_as_advanced(CMAKE_INSTALL_PYTHONDIR)
endif()
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_PYTHONDIR})
set(CMAKE_INSTALL_FULL_PYTHONDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_PYTHONDIR}")
else()
Expand Down

0 comments on commit 23f59fe

Please sign in to comment.