diff --git a/CMLibCommon.cmake b/CMLibCommon.cmake index 70e78f4..1851fd0 100644 --- a/CMLibCommon.cmake +++ b/CMLibCommon.cmake @@ -5,6 +5,10 @@ if(CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR) message(FATAL_ERROR "Cannot install into build directory") endif() +if(CMAKE_INSTALL_PREFIX STREQUAL PROJECT_SOURCE_DIR) + message(FATAL_ERROR "Cannot install into source directory") +endif() + include(CMLibDisableInSourceBuild) include(CMakeParseArguments) include(GNUInstallDirs)