We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b991c3 commit ba39f19Copy full SHA for ba39f19
src/cython_cmake/cmake/FindCython.cmake
@@ -13,6 +13,11 @@
13
# ``CYTHON_FOUND``
14
# true if the program was found
15
#
16
+# And the following target:
17
+#
18
+# ``Cython::Cython``
19
+# The Cython executable
20
21
# For more information on the Cython project, see https://cython.org/.
22
23
# *Cython is a language that makes writing C extensions for the Python language
@@ -84,6 +89,15 @@ find_package_handle_standard_args(Cython
84
89
VERSION_VAR ${CYTHON_VERSION}
85
90
)
86
91
92
+if(CYTHON_FOUND)
93
+ if(NOT DEFINED Cython::Cython)
94
+ add_executable(Cython::Cython IMPORTED)
95
+ set_target_properties(Cython::Cython PROPERTIES
96
+ IMPORTED_LOCATION "${CYTHON_EXECUTABLE}"
97
+ )
98
+ endif()
99
+endif()
100
+
87
101
mark_as_advanced(CYTHON_EXECUTABLE)
88
102
103
include(UseCython)
0 commit comments