File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,16 @@ function(generate_type_stubs MODULE_NAME DEPENDS_TARGET MLIR_DEPENDS_TARGET OUTP
116
116
""
117
117
"OUTPUTS"
118
118
${ARGN} )
119
+ # for people doing find_package(nanobind)
119
120
if (EXISTS ${nanobind_DIR} /../src/stubgen.py)
120
121
set (NB_STUBGEN "${nanobind_DIR} /../src/stubgen.py" )
121
122
elseif (EXISTS ${nanobind_DIR} /../stubgen.py)
122
123
set (NB_STUBGEN "${nanobind_DIR} /../stubgen.py" )
124
+ # for people using FetchContent_Declare and FetchContent_MakeAvailable
125
+ elseif (EXISTS ${nanobind_SOURCE_DIR} /src/stubgen.py)
126
+ set (NB_STUBGEN "${nanobind_SOURCE_DIR} /src/stubgen.py" )
127
+ elseif (EXISTS ${nanobind_SOURCE_DIR} /stubgen.py)
128
+ set (NB_STUBGEN "${nanobind_SOURCE_DIR} /stubgen.py" )
123
129
else ()
124
130
message (FATAL_ERROR "generate_type_stubs(): could not locate 'stubgen.py'!" )
125
131
endif ()
You can’t perform that action at this time.
0 commit comments