From e52733af8d366146c88b64287667c5e7bd25f776 Mon Sep 17 00:00:00 2001 From: h5p9sl <21267024+h5p9sl@users.noreply.github.com> Date: Fri, 9 Jul 2021 13:39:05 -0600 Subject: [PATCH] Use CMAKE_CURRENT_BINARY_DIR instead of CMAKE_BINARY_DIR This allows for building with cmake's add_subdirectory() function. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 690220714..7b95a4e16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) +if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there") endif()