From bbed79847e28501fb4709f1a328e4a9390164735 Mon Sep 17 00:00:00 2001 From: miheer vaidya Date: Thu, 19 Jan 2023 22:28:46 -0700 Subject: [PATCH] tools/Cmake: use PROJECT_BINARY_DIR This change allows other projects to import taco as subdirectory. Without this change, as CMAKE_BINARY_DIR points to parent project's build directory, build errors with "unable to open version.h". --- tools/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 922f7e52e..701cd7585 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -4,7 +4,7 @@ foreach(TOOL_SOURCE ${TOOL_SOURCES}) get_filename_component(TOOL ${TOOL_SOURCE} NAME_WE) add_executable("${TOOL}-tool" ${TOOL_SOURCE}) target_link_libraries("${TOOL}-tool" taco) - target_include_directories("${TOOL}-tool" PRIVATE "${CMAKE_BINARY_DIR}/include") + target_include_directories("${TOOL}-tool" PRIVATE "${PROJECT_BINARY_DIR}/include") SET_TARGET_PROPERTIES("${TOOL}-tool" PROPERTIES OUTPUT_NAME ${TOOL}) install(TARGETS "${TOOL}-tool" DESTINATION bin) endforeach()