File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,33 @@ message(STATUS "CMAKE_MODULE_PATH=" "${CMAKE_MODULE_PATH}")
57
57
58
58
# Add packages
59
59
find_package (PythonLibs REQUIRED )
60
+
61
+ if (NOT PythonLibs_FOUND )
62
+ # Manually get PYTHON_INCLUDE_DIRS
63
+ execute_process (
64
+ COMMAND python -c "import sysconfig; print(sysconfig.get_path('include'))"
65
+ OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS
66
+ RESULT_VARIABLE RET
67
+ OUTPUT_STRIP_TRAILING_WHITESPACE
68
+ )
69
+
70
+ if (RET EQUAL "1" )
71
+ message (FATAL_ERROR "Couldn't find PYTHON_INCLUDE_DIRS" )
72
+ endif ()
73
+
74
+ # Manually PYTHON_LIBRARIES
75
+ execute_process (
76
+ COMMAND python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))"
77
+ OUTPUT_VARIABLE PYTHON_LIBRARIES
78
+ RESULT_VARIABLE RET
79
+ OUTPUT_STRIP_TRAILING_WHITESPACE
80
+ )
81
+
82
+ if (RET EQUAL "1" )
83
+ message (FATAL_ERROR "Couldn't find PYTHON_LIBRARIES" )
84
+ endif ()
85
+ endif ()
86
+
60
87
find_package (PythonExtensions REQUIRED )
61
88
find_package (NumPy REQUIRED )
62
89
find_package (Dpctl REQUIRED )
You can’t perform that action at this time.
0 commit comments