From e8725494262cfc67f48d7edcb8f0ed93be773df2 Mon Sep 17 00:00:00 2001 From: burgholzer Date: Sat, 13 Jan 2024 12:40:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20always=20add=20mqt-core=20direct?= =?UTF-8?q?ory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: burgholzer --- cmake/ExternalDependencies.cmake | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/cmake/ExternalDependencies.cmake b/cmake/ExternalDependencies.cmake index af60155b..3d7ddd3f 100644 --- a/cmake/ExternalDependencies.cmake +++ b/cmake/ExternalDependencies.cmake @@ -80,21 +80,24 @@ if(BUILD_MQT_QCEC_TESTS) endif() if(BINDINGS) - if(NOT SKBUILD) - # Manually detect the installed mqt-core package. - execute_process( - COMMAND "${Python_EXECUTABLE}" -m mqt.core --cmake_dir - OUTPUT_STRIP_TRAILING_WHITESPACE - OUTPUT_VARIABLE mqt-core_DIR) + # Manually detect the installed mqt-core package. + execute_process( + COMMAND "${Python_EXECUTABLE}" -m mqt.core --cmake_dir + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE mqt-core_DIR) + # Add the detected directory to the CMake prefix path. + list(APPEND CMAKE_PREFIX_PATH "${mqt-core_DIR}") + + if(NOT SKBUILD) # Manually detect the installed pybind11 package. execute_process( COMMAND "${Python_EXECUTABLE}" -m pybind11 --cmakedir OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE pybind11_DIR) - # Add the detected directories to the CMake prefix path. - list(APPEND CMAKE_PREFIX_PATH "${pybind11_DIR}" "${mqt-core_DIR}") + # Add the detected directory to the CMake prefix path. + list(APPEND CMAKE_PREFIX_PATH "${pybind11_DIR}") endif() # add pybind11 library