File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -494,12 +494,17 @@ if (USE_PYTHON)
494
494
endif()
495
495
set_property(TARGET gemmi_py PROPERTY OUTPUT_NAME gemmi_ext)
496
496
if (CMAKE_CONFIGURATION_TYPES)
497
- set(py_dir $<CONFIG>/py> )
497
+ set(py_dir $<CONFIG>/py)
498
498
else()
499
499
set(py_dir py)
500
500
endif()
501
501
set_property(TARGET gemmi_py PROPERTY LIBRARY_OUTPUT_DIRECTORY ${py_dir} /gemmi)
502
- file(GENERATE OUTPUT ${py_dir} /gemmi/__init__.py INPUT python/gemmi/__init__.py)
502
+ add_custom_command(TARGET gemmi_py PRE_BUILD
503
+ COMMENT " Copying gemmi/__init__.py "
504
+ COMMAND ${CMAKE_COMMAND} -E copy
505
+ " ${CMAKE_CURRENT_SOURCE_DIR} /python/gemmi/__init__.py "
506
+ ${py_dir} /gemmi/__init__.py
507
+ BYPRODUCTS ${py_dir} /gemmi/__init__.py)
503
508
504
509
# nanobind gives warnings with -Wpedantic and -Wshadow
505
510
if(CMAKE_CXX_FLAGS MATCHES " -Wshadow ")
You can’t perform that action at this time.
0 commit comments