2021-10-28 16:57:24 +05:00
|
|
|
get_target_property(ngcore_compile_definitions ngcore INTERFACE_COMPILE_DEFINITIONS)
|
|
|
|
get_property(have_options TARGET ngcore PROPERTY INTERFACE_COMPILE_OPTIONS SET)
|
|
|
|
if(have_options)
|
|
|
|
get_target_property(ngcore_compile_options ngcore INTERFACE_COMPILE_OPTIONS)
|
|
|
|
endif(have_options)
|
|
|
|
|
2021-10-29 23:23:12 +05:00
|
|
|
configure_file(config_template.py ${CMAKE_CURRENT_BINARY_DIR}/config.py @ONLY)
|
2022-02-04 21:49:23 +05:00
|
|
|
configure_file(version_template.py ${CMAKE_CURRENT_BINARY_DIR}/version.py @ONLY)
|
2017-05-30 00:19:34 +05:00
|
|
|
|
|
|
|
install(FILES
|
2022-02-04 21:49:23 +05:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/config.py
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.py
|
2023-09-04 17:36:06 +05:00
|
|
|
__main__.py __init__.py config_cli.py
|
2022-02-13 20:31:55 +05:00
|
|
|
meshing.py csg.py geom2d.py stl.py gui.py NgOCC.py occ.py
|
|
|
|
read_gmsh.py read_meshio.py
|
2021-08-12 14:20:07 +05:00
|
|
|
webgui.py
|
2017-05-30 00:19:34 +05:00
|
|
|
DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX}
|
2015-04-08 23:04:28 +05:00
|
|
|
COMPONENT netgen
|
|
|
|
)
|
2019-06-29 23:01:05 +05:00
|
|
|
|
2022-02-07 23:04:26 +05:00
|
|
|
install(FILES
|
|
|
|
pyngcore/__init__.py
|
|
|
|
DESTINATION ${NG_INSTALL_DIR_PYTHON}/pyngcore
|
|
|
|
COMPONENT netgen
|
|
|
|
)
|
|
|
|
|
2019-06-29 23:01:05 +05:00
|
|
|
# build stub files for pybind11 packages
|
|
|
|
if(BUILD_STUB_FILES)
|
2023-08-31 20:04:45 +05:00
|
|
|
execute_process(COMMAND ${Python3_EXECUTABLE} -c "from importlib.metadata import version; print(version('pybind11-stubgen'))" OUTPUT_VARIABLE stubgen_version RESULT_VARIABLE pybind11_stubgen)
|
2020-07-25 11:46:46 +05:00
|
|
|
if(pybind11_stubgen AND NOT ${pybind11_stubgen} EQUAL 0)
|
2019-06-29 23:01:05 +05:00
|
|
|
message(WARNING "pybind11-stubgen not found, if you want to create stub files
|
|
|
|
for better autocompletion support install it with pip.")
|
2020-07-25 11:46:46 +05:00
|
|
|
else()
|
2023-08-31 20:04:45 +05:00
|
|
|
if(stubgen_version LESS "1.0")
|
|
|
|
message(WARNING "pybind11-stubgen version is too old, if you want to create stub files for better autocompletion support upgrade it with pip.")
|
|
|
|
else()
|
|
|
|
message("-- Found pybind11-stubgen version: ${stubgen_version}")
|
|
|
|
install(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} -m pybind11_stubgen --ignore-all-errors netgen)")
|
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../stubs/netgen/ DESTINATION ${NG_INSTALL_DIR_PYTHON}/netgen/ COMPONENT netgen)
|
|
|
|
endif()
|
2020-07-25 11:46:46 +05:00
|
|
|
endif()
|
2019-06-29 23:01:05 +05:00
|
|
|
endif(BUILD_STUB_FILES)
|