Link just against required VTK modules on Linux.
Note: If VTK is installed below /opt or anywhere else just add a path to GLOB_RECURSE.
This commit is contained in:
committed by
wmayer
parent
dd13cb2534
commit
69fa118b08
@@ -22,7 +22,7 @@ include_directories(
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${SMESH_INCLUDE_DIR}
|
||||
${NETGEN_INCLUDE_DIRS}
|
||||
${VTK_INCLUDE_DIR}
|
||||
${VTK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
@@ -43,16 +43,8 @@ if(BUILD_FEM_NETGEN)
|
||||
)
|
||||
endif(BUILD_FEM_NETGEN)
|
||||
|
||||
if(BUILD_FEM_VTK)
|
||||
set(Fem_LIBS
|
||||
${Fem_LIBS}
|
||||
${VTK_LIBRARIES}
|
||||
)
|
||||
endif(BUILD_FEM_VTK)
|
||||
|
||||
generate_from_xml(FemMeshPy)
|
||||
|
||||
|
||||
SET(Python_SRCS
|
||||
FemMeshPy.xml
|
||||
FemMeshPyImp.cpp
|
||||
|
||||
@@ -3,8 +3,6 @@ if(BUILD_FEM_VTK)
|
||||
add_definitions(-DFC_USE_VTK)
|
||||
endif(BUILD_FEM_VTK)
|
||||
|
||||
include(${VTK_USE_FILE})
|
||||
|
||||
add_subdirectory(App)
|
||||
|
||||
if(BUILD_GUI)
|
||||
|
||||
@@ -7,8 +7,6 @@ endif(MSVC)
|
||||
if(BUILD_FEM_NETGEN)
|
||||
add_definitions(-DFCWithNetgen)
|
||||
endif(BUILD_FEM_NETGEN)
|
||||
find_package(VTK REQUIRED)
|
||||
include(${VTK_USE_FILE})
|
||||
|
||||
include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
@@ -22,7 +20,7 @@ include_directories(
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${SMESH_INCLUDE_DIR}
|
||||
${VTK_INCLUDE_DIR}
|
||||
${VTK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
link_directories(${OCC_LIBRARY_DIR})
|
||||
@@ -34,13 +32,6 @@ set(FemGui_LIBS
|
||||
FreeCADGui
|
||||
)
|
||||
|
||||
if(BUILD_FEM_VTK)
|
||||
set(FemGui_LIBS
|
||||
${FemGui_LIBS}
|
||||
${VTK_LIBRARIES}
|
||||
)
|
||||
endif(BUILD_FEM_VTK)
|
||||
|
||||
generate_from_xml(ViewProviderFemMeshPy)
|
||||
|
||||
SET(Python_SRCS
|
||||
@@ -331,7 +322,7 @@ SET(FemGui_SRCS
|
||||
|
||||
|
||||
add_library(FemGui SHARED ${FemGui_SRCS})
|
||||
target_link_libraries(FemGui ${FemGui_LIBS})
|
||||
target_link_libraries(FemGui ${FemGui_LIBS} ${VTK_LIBRARIES})
|
||||
|
||||
|
||||
fc_target_copy_resource(FemGui
|
||||
|
||||
@@ -6,7 +6,6 @@ endif(MSVC)
|
||||
|
||||
if (BUILD_SMESH)
|
||||
add_definitions(-DHAVE_SMESH -DHAVE_MEFISTO)
|
||||
include(${VTK_USE_FILE})
|
||||
endif(BUILD_SMESH)
|
||||
|
||||
if(BUILD_FEM_NETGEN)
|
||||
@@ -21,6 +20,7 @@ include_directories(
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
${SMESH_INCLUDE_DIR}
|
||||
${VTK_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user