diff --git a/src/cython_cmake/cmake/FindCython.cmake b/src/cython_cmake/cmake/FindCython.cmake index fcbcebc..1e0a446 100644 --- a/src/cython_cmake/cmake/FindCython.cmake +++ b/src/cython_cmake/cmake/FindCython.cmake @@ -18,7 +18,7 @@ # ``Cython::Cython`` # The Cython executable # -# A range of versions is supported on CMake 3.19+. +# A range of versions is supported on CMake 3.19+. See also UseCython. # # For more information on the Cython project, see https://cython.org/. # @@ -109,5 +109,3 @@ if(CYTHON_FOUND) endif() mark_as_advanced(CYTHON_EXECUTABLE) - -include(UseCython) diff --git a/src/cython_cmake/cmake/UseCython.cmake b/src/cython_cmake/cmake/UseCython.cmake index 1bb66d1..adc9e88 100644 --- a/src/cython_cmake/cmake/UseCython.cmake +++ b/src/cython_cmake/cmake/UseCython.cmake @@ -37,6 +37,7 @@ # .. code-block:: cmake # # find_package(Cython) +# include(UseCython) # # Cython_compile_pyx(_hello.pyx # OUTPUT_VARIABLE _hello_source_files diff --git a/tests/packages/simple/CMakeLists.txt b/tests/packages/simple/CMakeLists.txt index 4d7f134..a37134d 100644 --- a/tests/packages/simple/CMakeLists.txt +++ b/tests/packages/simple/CMakeLists.txt @@ -6,6 +6,7 @@ find_package( COMPONENTS Interpreter Development.Module REQUIRED) find_package(Cython MODULE REQUIRED VERSION 3.0) +include(UseCython) cython_compile_pyx(simple.pyx LANGUAGE C OUTPUT_VARIABLE simple_c)