From bec554936cd57effb65da5800204fb2db7f6593c Mon Sep 17 00:00:00 2001
From: Niels Lohmann <mail@nlohmann.me>
Date: Sat, 2 May 2020 10:56:01 +0200
Subject: [PATCH] :hammer: fix paths

---
 cmake/download_test_data.cmake | 2 +-
 test/CMakeLists.txt            | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmake/download_test_data.cmake b/cmake/download_test_data.cmake
index 8cc93f88..5fe4972b 100644
--- a/cmake/download_test_data.cmake
+++ b/cmake/download_test_data.cmake
@@ -8,4 +8,4 @@ add_custom_target(download_test_data
 )
 
 # create a header with the path to the downloaded test data
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/json_test_data\"")
+file(WRITE ${CMAKE_BINARY_DIR}/include/test_data.hpp "#define TEST_DATA_DIRECTORY \"${CMAKE_BINARY_DIR}/json_test_data\"")
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 961e8f00..22cbea0b 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -4,7 +4,7 @@ option(JSON_NoExceptions "Build test suite without exceptions" OFF)
 option(JSON_Coverage "Build test suite with coverage information" OFF)
 
 # download test data
-include(${CMAKE_SOURCE_DIR}/cmake/download_test_data.cmake)
+include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/download_test_data.cmake)
 
 # test fixture to download test data
 add_test(NAME "download_test_data" COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target download_test_data)
@@ -164,7 +164,7 @@ foreach(file ${files})
         $<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
     )
     target_include_directories(${testcase} PRIVATE
-        ${CMAKE_CURRENT_BINARY_DIR}/include
+        ${CMAKE_BINARY_DIR}/include
         thirdparty/doctest
         thirdparty/fifo_map
     )