Запрет установки в каталог с исходниками

This commit is contained in:
Andrei Astafev 2021-06-01 13:32:03 +03:00
parent 8fbf0a3b3d
commit 956a94800f

View File

@ -5,6 +5,10 @@ if(CMAKE_INSTALL_PREFIX STREQUAL PROJECT_BINARY_DIR)
message(FATAL_ERROR "Cannot install into build directory") message(FATAL_ERROR "Cannot install into build directory")
endif() endif()
if(CMAKE_INSTALL_PREFIX STREQUAL PROJECT_SOURCE_DIR)
message(FATAL_ERROR "Cannot install into source directory")
endif()
include(CMLibDisableInSourceBuild) include(CMLibDisableInSourceBuild)
include(CMakeParseArguments) include(CMakeParseArguments)
include(GNUInstallDirs) include(GNUInstallDirs)