[cmake] Fix libraries privately

This commit is contained in:
Matthias Hochsteger 2019-06-30 00:26:16 +02:00
parent db9e2b96e7
commit 4aadd29dfc
8 changed files with 12 additions and 11 deletions

View File

@ -654,6 +654,10 @@ namespace ngcore
} }
else else
{ {
if(node_stack.size()==0) {
std::cout << "node stack empty!" << std::endl;
break;
}
double time = 1000.0*static_cast<double>(event.time-current->start_time)/ticks_per_second; double time = 1000.0*static_cast<double>(event.time-current->start_time)/ticks_per_second;
current->time += time; current->time += time;
current = node_stack.back(); current = node_stack.back();

View File

@ -11,7 +11,7 @@ if(APPLE)
set_target_properties( csg PROPERTIES SUFFIX ".so") set_target_properties( csg PROPERTIES SUFFIX ".so")
endif(APPLE) endif(APPLE)
target_link_libraries(csg PUBLIC mesh ${PYTHON_LIBRARIES}) target_link_libraries(csg PUBLIC mesh PRIVATE ${PYTHON_LIBRARIES})
if(NOT WIN32) if(NOT WIN32)
install( TARGETS csg ${NG_INSTALL_DIR}) install( TARGETS csg ${NG_INSTALL_DIR})
endif(NOT WIN32) endif(NOT WIN32)

View File

@ -4,13 +4,11 @@ if(APPLE)
set_target_properties( geom2d PROPERTIES SUFFIX ".so") set_target_properties( geom2d PROPERTIES SUFFIX ".so")
endif(APPLE) endif(APPLE)
target_link_libraries(geom2d mesh ${PYTHON_LIBRARIES}) target_link_libraries(geom2d PUBLIC ngcore mesh PRIVATE ${PYTHON_LIBRARIES})
if(NOT WIN32) if(NOT WIN32)
install( TARGETS geom2d ${NG_INSTALL_DIR}) install( TARGETS geom2d ${NG_INSTALL_DIR})
endif(NOT WIN32) endif(NOT WIN32)
target_link_libraries(geom2d ngcore)
if(USE_GUI) if(USE_GUI)
add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp) add_library(geom2dvis ${NG_LIB_TYPE} vsgeom2d.cpp)
if(NOT WIN32) if(NOT WIN32)

View File

@ -23,7 +23,7 @@ endif(APPLE)
target_link_libraries( mesh PUBLIC ngcore PRIVATE gprim la gen ) target_link_libraries( mesh PUBLIC ngcore PRIVATE gprim la gen )
target_link_libraries( mesh PUBLIC ${ZLIB_LIBRARIES} ${MPI_CXX_LIBRARIES} ${PYTHON_LIBRARIES} ${METIS_LIBRARY}) target_link_libraries( mesh PRIVATE ${ZLIB_LIBRARIES} ${MPI_CXX_LIBRARIES} ${PYTHON_LIBRARIES} ${METIS_LIBRARY})
if(NOT WIN32) if(NOT WIN32)
install( TARGETS mesh ${NG_INSTALL_DIR}) install( TARGETS mesh ${NG_INSTALL_DIR})
endif(NOT WIN32) endif(NOT WIN32)

View File

@ -11,7 +11,7 @@ endif(USE_GUI)
target_link_libraries(occ PUBLIC ngcore) target_link_libraries(occ PUBLIC ngcore)
if(NOT WIN32) if(NOT WIN32)
target_link_libraries( occ PUBLIC ${OCC_LIBRARIES} ${PYTHON_LIBRARIES}) target_link_libraries( occ PRIVATE ${OCC_LIBRARIES} ${PYTHON_LIBRARIES})
install( TARGETS occ ${NG_INSTALL_DIR}) install( TARGETS occ ${NG_INSTALL_DIR})
if (USE_GUI) if (USE_GUI)
target_link_libraries( occvis PUBLIC occ ) target_link_libraries( occvis PUBLIC occ )

View File

@ -4,12 +4,11 @@ add_library(stl ${NG_LIB_TYPE}
) )
if(NOT WIN32) if(NOT WIN32)
target_link_libraries( stl mesh ${PYTHON_LIBRARIES}) target_link_libraries( stl PUBLIC mesh PRIVATE ${PYTHON_LIBRARIES})
install( TARGETS stl ${NG_INSTALL_DIR}) install( TARGETS stl ${NG_INSTALL_DIR})
endif(NOT WIN32) endif(NOT WIN32)
target_link_libraries( stl ngcore ) target_link_libraries( stl PUBLIC ngcore )
if(USE_GUI) if(USE_GUI)
add_library(stlvis ${NG_LIB_TYPE} add_library(stlvis ${NG_LIB_TYPE}

View File

@ -9,7 +9,7 @@ endif(USE_GUI)
add_library(visual ${NG_LIB_TYPE} ${LIB_VISUAL_SOURCES}) add_library(visual ${NG_LIB_TYPE} ${LIB_VISUAL_SOURCES})
target_link_libraries( visual ngcore ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ) target_link_libraries( visual PUBLIC ngcore PRIVATE ${PYTHON_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} )
install( TARGETS visual ${NG_INSTALL_DIR}) install( TARGETS visual ${NG_INSTALL_DIR})
install(FILES install(FILES

View File

@ -30,7 +30,7 @@ if(USE_GUI)
target_link_libraries( gui PRIVATE ${TCL_LIBRARY} ${TK_LIBRARY}) target_link_libraries( gui PRIVATE ${TCL_LIBRARY} ${TK_LIBRARY})
endif(NOT APPLE) endif(NOT APPLE)
target_link_libraries( netgen nglib gui ${LIBTOGL} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_Xmu_LIB} ${X11_X11_LIB} ${OCC_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${PYTHON_LIBRARIES}) target_link_libraries( netgen nglib gui ${MPI_mpi_LIBRARY} ${MPI_CXX_LIBRARIES} ${LIBTOGL} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_Xmu_LIB} ${X11_X11_LIB} ${OCC_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY} ${PYTHON_LIBRARIES})
if(NOT WIN32) if(NOT WIN32)
target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis ) target_link_libraries( netgen mesh stlvis stl geom2dvis interface geom2d csg stl visual csgvis )