-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·94 lines (65 loc) · 1.86 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(US_Probe_Calibration)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR "Cannot build US Probe Calibration without ITK. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
FIND_PACKAGE (VTK)
IF (VTK_FOUND)
INCLUDE(${USE_VTK_FILE})
ELSE(VTK_FOUND)
MESSAGE(FATAL_ERROR "Cannot build US Probe Calibration without VTK. Please set ITK_DIR.")
ENDIF(VTK_FOUND)
# Find the LSQRRecipies for calibration
FIND_PACKAGE(LSQRRecipes)
IF(LSQRRecipes_FOUND)
INCLUDE(${LSQRRecipes_USE_FILE})
ELSE(LSQRRecipes_FOUND)
MESSAGE(FATAL_ERROR "Cannot build US Probe Calibration without LSQRRecipes.")
ENDIF(LSQRRecipes_FOUND)
# Find QT
FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE( ${QT_USE_FILE} )
# support for out-of-source build
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR} #this is where ui_ImageViewerUI.h is generated
${CMAKE_CURRENT_SOURCE_DIR}
)
# Set your files and resources here
SET(AppSrcs
main.cpp
mainwindow.cpp
QVTKImageWidget.cpp
QVTKImageWidgetCommand.cpp
ProbeCalibrationWidget.cpp
CalibrationPointsSquaresFunction.cpp
)
SET(AppHeaders
mainwindow.h
QVTKImageWidget.h
QVTKImageWidgetCommand.h
ProbeCalibrationWidget.h
CalibrationPointsSquaresFunction.h
)
SET(AppUI
mainwindow.ui
ProbeCalibrationWidget.ui
)
# for generate qt aditional files
QT4_WRAP_UI(UISrcs ${AppUI})
QT4_WRAP_CPP(MOCSrcs ${AppHeaders} )
# Packaging source code in same files
SOURCE_GROUP("Resources" FILES
${AppUI}
)
SOURCE_GROUP("Generated" FILES
${UISrcs}
${MOCSrcs}
)
ADD_EXECUTABLE(US_Probe_Calibration ${AppSrcs} ${AppHeaders} ${UISrcs} ${MOCSrcs})
TARGET_LINK_LIBRARIES(US_Probe_Calibration QVTK ${VTK_LIBRARIES} ${ITK_LIBRARIES} LSQRRecipes)