netgen/nglib/CMakeLists.txt

51 lines
1.7 KiB
CMake
Raw Normal View History

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:stlvis>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:geom2dvis>
$<TARGET_OBJECTS:interface>
$<TARGET_OBJECTS:geom2d>
$<TARGET_OBJECTS:csg>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:gen>
$<TARGET_OBJECTS:la>
$<TARGET_OBJECTS:gprim>
$<TARGET_OBJECTS:visual>
$<TARGET_OBJECTS:csgvis>
2016-03-14 18:22:25 +05:00
$<TARGET_OBJECTS: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)
target_link_libraries( nglib mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis )
endif(NOT WIN32)
2015-03-06 18:59:14 +05:00
2016-03-14 18:22:25 +05:00
target_link_libraries( nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${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)
2015-04-09 15:39:41 +05:00
# if(NOT WIN32)
# add_executable(ng_vol ng_vol.cpp ${nglib_objects})
# target_link_libraries( ng_vol nglib ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} )
# target_link_libraries( ng_vol nglib interface geom2d csg stl occ mesh )
#
# add_executable(ng_stl ng_stl.cpp ${nglib_objects})
# target_link_libraries( ng_stl nglib ${OCC_LIBRARIES} ${OCC_OCAF_LIBRARIES} ${MPI_CXX_LIBRARIES} )
# target_link_libraries( ng_stl nglib interface geom2d csg stl occ mesh )
#
# install(TARGETS nglib ng_vol ng_stl ${ng_install_dir})
# endif(NOT WIN32)
2015-03-06 18:59:14 +05:00
2015-04-09 16:19:51 +05:00
install(TARGETS nglib ${ng_install_dir})