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>
|
|
|
|
$<TARGET_OBJECTS:stl>
|
|
|
|
$<TARGET_OBJECTS:interface>
|
|
|
|
$<TARGET_OBJECTS:geom2d>
|
|
|
|
$<TARGET_OBJECTS:csg>
|
|
|
|
$<TARGET_OBJECTS:stl>
|
|
|
|
$<TARGET_OBJECTS:gen>
|
|
|
|
$<TARGET_OBJECTS:la>
|
|
|
|
$<TARGET_OBJECTS:gprim>
|
|
|
|
|
|
|
|
$<TARGET_OBJECTS:visual>
|
2016-03-14 18:22:25 +05:00
|
|
|
$<TARGET_OBJECTS:occ>
|
2015-03-06 18:59:14 +05:00
|
|
|
)
|
2017-07-21 17:24:49 +05:00
|
|
|
if(USE_GUI)
|
|
|
|
set(nglib_objects ${nglib_objects}
|
|
|
|
$<TARGET_OBJECTS:stlvis>
|
|
|
|
$<TARGET_OBJECTS:geom2dvis>
|
|
|
|
$<TARGET_OBJECTS:csgvis>
|
|
|
|
)
|
|
|
|
endif(USE_GUI)
|
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)
|
2017-01-31 19:35:56 +05:00
|
|
|
target_link_libraries( nglib mesh stl interface geom2d csg stl visual)
|
|
|
|
if(USE_GUI)
|
|
|
|
target_link_libraries( nglib stlvis geom2dvis csgvis )
|
|
|
|
endif(USE_GUI)
|
2015-10-20 14:09:29 +05:00
|
|
|
endif(NOT WIN32)
|
2015-03-06 18:59:14 +05:00
|
|
|
|
2017-05-10 22:34:42 +05:00
|
|
|
target_link_libraries( nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} )
|
2015-03-06 18:59:14 +05:00
|
|
|
|
2016-03-14 18:22:25 +05:00
|
|
|
if(USE_OCC AND NOT WIN32)
|
2016-02-15 12:55:49 +05:00
|
|
|
target_link_libraries(nglib 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)
|
2017-01-09 22:45:12 +05:00
|
|
|
target_link_libraries(nglib ${PYTHON_LIBRARIES})
|
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})
|
|
|
|
install(FILES nglib.h DESTINATION ${NG_INSTALL_DIR_INCLUDE}/include COMPONENT netgen_devel)
|