2021-10-28 13:57:24 +02: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 20:23:12 +02:00
|
|
|
configure_file(config_template.py ${CMAKE_CURRENT_BINARY_DIR}/config.py @ONLY)
|
2022-02-04 17:49:23 +01:00
|
|
|
configure_file(version_template.py ${CMAKE_CURRENT_BINARY_DIR}/version.py @ONLY)
|
2017-05-29 21:19:34 +02:00
|
|
|
|
|
|
|
install(FILES
|
2022-02-04 17:49:23 +01:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/config.py
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/version.py
|
|
|
|
__main__.py __init__.py
|
2022-02-13 16:31:55 +01:00
|
|
|
meshing.py csg.py geom2d.py stl.py gui.py NgOCC.py occ.py
|
|
|
|
read_gmsh.py read_meshio.py
|
2021-08-12 11:20:07 +02:00
|
|
|
webgui.py
|
2017-05-29 21:19:34 +02:00
|
|
|
DESTINATION ${NG_INSTALL_DIR_PYTHON}/${NG_INSTALL_SUFFIX}
|
2015-04-08 20:04:28 +02:00
|
|
|
COMPONENT netgen
|
|
|
|
)
|
2019-06-29 20:01:05 +02:00
|
|
|
|
2022-02-07 19:04:26 +01:00
|
|
|
install(FILES
|
|
|
|
pyngcore/__init__.py
|
|
|
|
DESTINATION ${NG_INSTALL_DIR_PYTHON}/pyngcore
|
|
|
|
COMPONENT netgen
|
|
|
|
)
|
|
|
|
|
2019-06-29 20:01:05 +02:00
|
|
|
# build stub files for pybind11 packages
|
|
|
|
if(BUILD_STUB_FILES)
|
2020-07-25 08:46:46 +02:00
|
|
|
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import pybind11_stubgen; print(pybind11_stubgen.__file__)" OUTPUT_VARIABLE stubgen_path RESULT_VARIABLE pybind11_stubgen)
|
|
|
|
if(pybind11_stubgen AND NOT ${pybind11_stubgen} EQUAL 0)
|
2019-06-29 20:01:05 +02: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 08:46:46 +02:00
|
|
|
else()
|
|
|
|
message("-- Found pybind11-stubgen: ${stubgen_path}")
|
2020-07-25 13:04:18 +02:00
|
|
|
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11_stubgen --no-setup-py netgen)")
|
2020-07-25 08:46:46 +02:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../stubs/netgen-stubs/ DESTINATION ${NG_INSTALL_DIR_PYTHON}/netgen/ COMPONENT netgen)
|
|
|
|
endif()
|
2019-06-29 20:01:05 +02:00
|
|
|
endif(BUILD_STUB_FILES)
|