netgen/libsrc/visualization/CMakeLists.txt
Matthias Hochsteger 94ecf8de92 Fix private linking of Python
The CMake export of Interface libraries also exports PRIVATE build
settings, which leads to build errors with non-existing include paths and .lib files for binary distributions.

Use the work-around mentioned here to circumvent this behavior:
https://gitlab.kitware.com/cmake/cmake/-/issues/15415#note_849405
2020-12-18 11:05:10 +01:00

20 lines
722 B
CMake

add_definitions(-DNGINTERFACE_EXPORTS)
install(FILES soldata.hpp DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel )
if(USE_GUI)
set( LIB_VISUAL_SOURCES meshdoc.cpp mvdraw.cpp vsfieldlines.cpp vsmesh.cpp vssolution.cpp importsolution.cpp )
else(USE_GUI)
set( LIB_VISUAL_SOURCES visual_dummy.cpp )
endif(USE_GUI)
add_library(visual ${NG_LIB_TYPE} ${LIB_VISUAL_SOURCES})
target_link_libraries( visual PUBLIC ngcore PRIVATE "$<BUILD_INTERFACE:netgen_python>" ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} )
install( TARGETS visual ${NG_INSTALL_DIR})
install(FILES
meshdoc.hpp mvdraw.hpp
vispar.hpp visual.hpp vssolution.hpp
DESTINATION ${NG_INSTALL_DIR_INCLUDE}/visualization COMPONENT netgen_devel
)