diff --git a/CMakeLists.txt b/CMakeLists.txt index aa950719..637647a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -756,7 +756,11 @@ else() endif() endif() file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in") -install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) +if(INSTALL_DIR) + install(FILES ${CMAKES} DESTINATION ${INSTALL_DIR}/cmake) +else() + install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules) +endif() shstk_is_parent_exists(_pe)