mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
[cmake] Set link interface of dependencies to PRIVATE
This commit is contained in:
parent
c55767369a
commit
c1a407c4f6
@ -24,10 +24,10 @@ if(USE_GUI)
|
||||
|
||||
add_executable(netgen ngappinit.cpp onetcl.cpp)
|
||||
|
||||
target_link_libraries( gui PUBLIC nglib ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_X11_LIB} ${OCC_LIBRARIES} )
|
||||
target_link_libraries( gui PRIVATE ${LIBTOGL})
|
||||
target_link_libraries( gui PUBLIC nglib )
|
||||
target_link_libraries( gui PRIVATE ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_Xmu_LIB} ${X11_X11_LIB} ${OCC_LIBRARIES} ${LIBTOGL} )
|
||||
|
||||
target_link_libraries( netgen nglib gui )
|
||||
target_link_libraries( netgen nglib gui ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES} ${FFMPEG_LIBRARIES} ${X11_Xmu_LIB} ${X11_X11_LIB} ${OCC_LIBRARIES} ${LIBTOGL} )
|
||||
|
||||
if(APPLE)
|
||||
# Leave decision about which tcl/tk version to use open to python (and it's tkinter package).
|
||||
@ -57,7 +57,7 @@ endif(USE_GUI)
|
||||
|
||||
if(USE_PYTHON)
|
||||
add_library(ngpy SHARED netgenpy.cpp)
|
||||
target_link_libraries( ngpy nglib )
|
||||
target_link_libraries( ngpy PUBLIC nglib PRIVATE ${PYTHON_LIBRARIES})
|
||||
if(APPLE)
|
||||
set_target_properties( ngpy PROPERTIES SUFFIX ".so")
|
||||
elseif(WIN32)
|
||||
|
@ -26,20 +26,20 @@ endif(WIN32)
|
||||
|
||||
add_library(nglib SHARED nglib.cpp ${nglib_objects})
|
||||
if(NOT WIN32)
|
||||
target_link_libraries( nglib mesh stl interface geom2d csg stl visual)
|
||||
target_link_libraries( nglib PUBLIC mesh stl interface geom2d csg stl visual)
|
||||
if(USE_GUI)
|
||||
target_link_libraries( nglib stlvis geom2dvis csgvis )
|
||||
target_link_libraries( nglib PUBLIC stlvis geom2dvis csgvis )
|
||||
endif(USE_GUI)
|
||||
endif(NOT WIN32)
|
||||
|
||||
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} )
|
||||
target_link_libraries( nglib PRIVATE ${OCC_LIBRARIES} ${MPI_CXX_LIBRARIES} ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ${X11_Xmu_LIB} ${JPEG_LIBRARIES} ${MKL_LIBRARIES} ${ZLIB_LIBRARIES} ${OCC_LIBRARIES} )
|
||||
|
||||
if(USE_OCC AND NOT WIN32)
|
||||
target_link_libraries(nglib occ)
|
||||
target_link_libraries(nglib PUBLIC occ)
|
||||
endif(USE_OCC AND NOT WIN32)
|
||||
|
||||
if(USE_PYTHON)
|
||||
target_link_libraries(nglib ${PYTHON_LIBRARIES})
|
||||
target_link_libraries(nglib PRIVATE ${PYTHON_LIBRARIES})
|
||||
endif(USE_PYTHON)
|
||||
|
||||
install(TARGETS nglib ${NG_INSTALL_DIR})
|
||||
|
Loading…
Reference in New Issue
Block a user