File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,9 @@ function(pybind11_add_module target_name)
208
208
if (ARG_OPT_SIZE)
209
209
target_link_libraries (${target_name} PRIVATE pybind11::opt_size)
210
210
endif ()
211
+
212
+ # Avoid the -D${target_name}_EXPORTS definition that CMake adds by default
213
+ set_property (TARGET ${target_name} PROPERTY DEFINE_SYMBOL "" )
211
214
endfunction ()
212
215
213
216
function (pybind11_extension name )
Original file line number Diff line number Diff line change @@ -188,4 +188,7 @@ function(pybind11_add_module target_name)
188
188
if (ARG_OPT_SIZE)
189
189
target_link_libraries (${target_name} PRIVATE pybind11::opt_size)
190
190
endif ()
191
+
192
+ # Avoid the -D${target_name}_EXPORTS definition that CMake adds by default
193
+ set_property (TARGET ${target_name} PROPERTY DEFINE_SYMBOL "" )
191
194
endfunction ()
You can’t perform that action at this time.
0 commit comments