2015-03-06 18:59:14 +05:00
|
|
|
add_definitions(-DNGLIB_EXPORTS)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
set(nglib_objects
|
2015-10-19 13:08:30 +05:00
|
|
|
$<TARGET_OBJECTS:mesh>
|
2019-10-03 14:00:44 +05:00
|
|
|
$<TARGET_OBJECTS:stl>
|
2015-10-19 13:08:30 +05:00
|
|
|
$<TARGET_OBJECTS:interface>
|
|
|
|
$<TARGET_OBJECTS:geom2d>
|
|
|
|
$<TARGET_OBJECTS:csg>
|
|
|
|
|
|
|
|
$<TARGET_OBJECTS:visual>
|
2015-03-06 18:59:14 +05:00
|
|
|
)
|
2017-07-21 17:24:49 +05:00
|
|
|
if(USE_GUI)
|
|
|
|
set(nglib_objects ${nglib_objects}
|
2019-10-03 14:05:56 +05:00
|
|
|
$<TARGET_OBJECTS:stlvis>
|
2017-07-21 17:24:49 +05:00
|
|
|
$<TARGET_OBJECTS:geom2dvis>
|
|
|
|
$<TARGET_OBJECTS:csgvis>
|
|
|
|
)
|
|
|
|
endif(USE_GUI)
|
2021-12-07 23:07:04 +05:00
|
|
|
if(USE_OCC)
|
|
|
|
set(nglib_objects ${nglib_objects} $<TARGET_OBJECTS:occ>)
|
|
|
|
endif(USE_OCC)
|
2015-03-06 18:59:14 +05:00
|
|
|
endif(WIN32)
|
|
|
|
|
2015-10-19 13:08:30 +05:00
|
|
|
add_library(nglib SHARED nglib.cpp ${nglib_objects})
|
2015-10-20 14:09:29 +05:00
|
|
|
if(NOT WIN32)
|
2019-10-03 14:05:56 +05:00
|
|
|
target_link_libraries( nglib PUBLIC mesh interface geom2d csg stl visual)
|
2017-01-31 19:35:56 +05:00
|
|
|
if(USE_GUI)
|
2019-10-03 14:05:56 +05:00
|
|
|
target_link_libraries( nglib PUBLIC stlvis geom2dvis csgvis )
|
2017-01-31 19:35:56 +05:00
|
|
|
endif(USE_GUI)
|
2015-10-20 14:09:29 +05:00
|
|
|
endif(NOT WIN32)
|
2015-03-06 18:59:14 +05:00
|
|
|
|
2019-01-08 17:12:12 +05:00
|
|
|
# target_link_libraries(nglib PRIVATE gen la gprim PUBLIC ngcore)
|
|
|
|
target_link_libraries(nglib PUBLIC ngcore)
|
2018-12-12 15:05:17 +05:00
|
|
|
|
2021-09-02 17:52:34 +05:00
|
|
|
target_link_libraries( nglib PRIVATE ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} netgen_cgns )
|
2015-03-06 18:59:14 +05:00
|
|
|
|
2016-03-14 18:22:25 +05:00
|
|
|
if(USE_OCC AND NOT WIN32)
|
2018-11-13 15:22:37 +05:00
|
|
|
target_link_libraries(nglib PUBLIC occ)
|
2016-03-14 18:22:25 +05:00
|
|
|
endif(USE_OCC AND NOT WIN32)
|
2016-02-15 12:55:49 +05:00
|
|
|
|
2015-03-06 18:59:14 +05:00
|
|
|
if(USE_PYTHON)
|
2021-10-27 19:50:07 +05:00
|
|
|
target_link_libraries(nglib PRIVATE netgen_python)
|
2015-03-06 18:59:14 +05:00
|
|
|
endif(USE_PYTHON)
|
|
|
|
|
2017-05-30 00:19:34 +05:00
|
|
|
install(TARGETS nglib ${NG_INSTALL_DIR})
|
2018-01-23 14:06:12 +05:00
|
|
|
install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE} COMPONENT netgen_devel)
|