CMakeLists.txt 839 Bytes
Newer Older
1
PROJECT(Win32SampleMFC)
2

3
4
5
FIND_PACKAGE(VTK)
IF(NOT VTK_DIR)
  MESSAGE(FATAL_ERROR "Please set VTK_DIR.")
6
ENDIF()
7
INCLUDE(${VTK_USE_FILE})
8

9
10
11
12
13
14
15
16
17
18
19
# This VTK_DIR usage only works in the VTK build tree...
# Make it work in the "make install" tree, too.
#
INCLUDE("${VTK_DIR}/GUISupport/MFC/VTKMFCSettings.cmake")
IF(VTK_MFC_DELAYLOAD_VTK_DLLS)
  VTK_MFC_ADD_DELAYLOAD_FLAGS(CMAKE_EXE_LINKER_FLAGS
    vtkRendering.dll
    vtkIO.dll
    vtkFiltering.dll
    vtkCommon.dll
    )
20
ENDIF()
21

22
SET(SRCS
23
24
25
26
27
28
29
30
31
32
33
34
35
ChildFrm.cpp
MainFrm.cpp
Sample.cpp
Sample.rc
SampleDoc.cpp
SampleView.cpp
StdAfx.cpp
vtkMFCDocument.cpp
vtkMFCRenderView.cpp
vtkMFCView.cpp
res/Sample.rc2
)

36
ADD_EXECUTABLE(Win32SampleMFC WIN32 ${SRCS})
37
38
39

IF(VTK_MFC_EXTRA_LIBS)
  TARGET_LINK_LIBRARIES(Win32SampleMFC ${VTK_MFC_EXTRA_LIBS})
40
ENDIF()
41

42
TARGET_LINK_LIBRARIES(Win32SampleMFC ${VTK_LIBRARIES})