diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index ccd1ed702bca5b0bd9a8ef978e0444f986f392f2..81c1a3530d80c0169b4a1d9f0a78bf0a3899b1d4 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -29,7 +29,11 @@ TARGET_LINK_BOOST_PYTHON(${PYWRAP}) #IF(BUILD_WITH_COMMIT_VERSION) # TAG_LIBRARY_VERSION(${PYWRAP}) #ENDIF(BUILD_WITH_COMMIT_VERSION) -SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}) +IF(DEFINED EIGENPY_SITELIB_ROOT AND EIGENPY_SITELIB_ROOT) + SET(${PYWRAP}_INSTALL_DIR ${EIGENPY_SITELIB_ROOT}/${PYTHON_SITELIB}) +ELSE() + SET(${PYWRAP}_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}) +ENDIF() SET_PROPERTY(TARGET ${PYWRAP} PROPERTY LINKER_LANGUAGE CXX) SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES SUFFIX ${PYTHON_EXT_SUFFIX})