netgen/nglib/CMakeLists.txt

49 lines
1.6 KiB
CMake
Raw Normal View History

2015-03-06 18:59:14 +05:00
# dist_pkgdata_DATA = cube.surf
add_definitions(-DNGLIB_EXPORTS)
# ADD_LIBRARY(nglib SHARED nglib.cpp)
# TARGET_LINK_LIBRARIES( nglib interface geom2d csg stl occ mesh ${OCCLIBS} ${MPI_CXX_LIBRARIES} )
set(nglib_sources nglib.cpp)
if(WIN32)
set(nglib_objects
$<TARGET_OBJECTS:interface>
$<TARGET_OBJECTS:geom2d>
$<TARGET_OBJECTS:csg>
$<TARGET_OBJECTS:stl>
$<TARGET_OBJECTS:occ>
$<TARGET_OBJECTS:mesh>
$<TARGET_OBJECTS:gen>
$<TARGET_OBJECTS:la>
$<TARGET_OBJECTS:gprim>
$<TARGET_OBJECTS:visual>
$<TARGET_OBJECTS:csgvis>
# $<TARGET_OBJECTS:geom2dvis>
# $<TARGET_OBJECTS:occvis>
# $<TARGET_OBJECTS:stlvis>
)
endif(WIN32)
add_library(nglib SHARED ${nglib_sources} ${nglib_objects})
target_link_libraries( nglib ${LIBPTHREAD} ${OCCLIBS} ${LIBTOGL} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} )
if(USE_PYTHON)
target_link_libraries(nglib ${PYTHON_LIBS})
endif(USE_PYTHON)
if(NOT WIN32)
add_executable(ng_vol ng_vol.cpp ${nglib_objects})
target_link_libraries( ng_vol nglib ${OCCLIBS} ${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 ${OCCLIBS} ${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-04-08 23:04:28 +05:00
install(TARGETS nglib COMPONENT netgen ${ng_install_dir})