Add guard to prevent from building in-source

This commit is contained in:
Michał Janiszewski 2016-03-27 23:29:45 +02:00
parent 966291eda2
commit 2b790e1b5a
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,10 @@ set (ORCT2_RESOURCE_DIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT}/)
project(${PROJECT})
if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
endif()
add_definitions(-DORCT2_RESOURCE_DIR="${ORCT2_RESOURCE_DIR}")
add_definitions(-DHAVE_CONFIG_H)
add_definitions(-DCURL_STATICLIB)