Select Git revision
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
wsclean-buildfix.patch 1.53 KiB
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 040c3bf..5c2b01b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,9 +116,22 @@ find_path(
NAMES fftw3.h
HINTS ENV FFTW3_INCLUDE)
-find_package(PythonLibs 3 REQUIRED)
-find_package(PythonInterp REQUIRED)
message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
+if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
+ find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
+else() # Use old, deprecated means of detecting python.
+ find_package(PythonInterp 3 REQUIRED)
+ find_package(PythonLibs 3 REQUIRED)
+ set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE})
+ set(Python3_VERSION ${PYTHON_VERSION_STRING})
+ set(Python3_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
+ set(Python3_VERSION_MINOR ${PYTHON_VERSION_MINOR})
+ set(Python3_INCLUDE_DIRS ${PYTHON_INCLUDE_DIRS})
+ set(Python3_LIBRARIES ${PYTHON_LIBRARIES})
+endif()
+
+message(STATUS "Using python version ${PYTHON_VERSION_STRING}")
+include_directories(${Python3_INCLUDE_DIRS})
# Include pybind11
add_subdirectory("${CMAKE_SOURCE_DIR}/external/pybind11")
@@ -373,8 +386,8 @@ set(ALL_LIBRARIES
schaapcommon)
# Perform the BLAS check from aocommon
-include("${CMAKE_CURRENT_LIST_DIR}/external/aocommon/CMake/CheckBLAS.cmake")
-check_blas(LIBRARIES ${ALL_LIBRARIES})
+#include("${CMAKE_CURRENT_LIST_DIR}/external/aocommon/CMake/CheckBLAS.cmake")
+#check_blas(LIBRARIES ${ALL_LIBRARIES})
add_library(wsclean-lib STATIC ${WSCLEANFILES})
target_link_libraries(wsclean-lib PRIVATE pybind11::embed ${ALL_LIBRARIES})