diff --git a/CMakeLists.txt b/CMakeLists.txt index bd72356f..4855f5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,10 +243,6 @@ if(KOMPUTE_OPT_ANDROID_BUILD) add_compile_definitions(VK_USE_PLATFORM_ANDROID_KHR=1) endif() -if(KOMPUTE_OPT_BUILD_PYTHON) - add_compile_definitions(KOMPUTE_BUILD_PYTHON=1) -endif() - if(KOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS) add_compile_definitions(KOMPUTE_DISABLE_VK_DEBUG_LAYERS=1) endif() diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 1b4598fb..ea02fdb2 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -7,3 +7,6 @@ include_directories( target_link_libraries( kp PRIVATE kompute::kompute) + +# Only the Python module needs KOMPUTE_BUILD_PYTHON +target_compile_definitions(kp PRIVATE KOMPUTE_BUILD_PYTHON=1) diff --git a/src/Tensor.cpp b/src/Tensor.cpp index a1eaccf2..8d78d143 100644 --- a/src/Tensor.cpp +++ b/src/Tensor.cpp @@ -1,5 +1,6 @@ // SPDX-License-Identifier: Apache-2.0 +#include #include "kompute/Tensor.hpp" #include "kompute/Image.hpp"