-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
124 lines (104 loc) · 2.4 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
cmake_minimum_required(VERSION 2.8)
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)
project(IADE_Analyzer)
# MSUT find vtk first
#VTK
find_package(VTK REQUIRED)
if (NOT VTK_FOUND)
message(FATAL_ERROR "error: VTK is not found")
endif()
include(${VTK_USE_FILE})
#ITK
find_package(ITK REQUIRED)
if (NOT ITK_FOUND)
message(FATAL_ERROR "error: ITK is not found")
endif()
include(${ITK_USE_FILE})
#VMTK
find_package(VMTK REQUIRED)
if (NOT VMTK_FOUND)
message(FATAL_ERROR "error: VMTK is not found")
endif()
include(${VMTK_USE_FILE})
#QT5
find_package(Qt5Core)
find_package(Qt5Widgets)
#QT
# if(${VTK_VERSION} VERSION_GREATER "6" AND VTK_QT_VERSION VERSION_GREATER "4")
# # Instruct CMake to run moc automatically when needed.
# # set(CMAKE_AUTOMOC ON)
# # find_package(Qt5PrintSupport REQUIRED)
# find_package(Qt5Widgets REQUIRED QUIET)
# # add_definitions(-DQT5_IS_LOADED)
# else()
# find_package(Qt4 REQUIRED)
# include(${QT_USE_FILE})
# endif()
# multi-processor build
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} /MP"
)
set(
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/lib
)
set(
CMAKE_LIBRARY_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/lib
)
set(
CMAKE_RUNTIME_OUTPUT_DIRECTORY
${CMAKE_SOURCE_DIR}/bin
)
set(
MAIN_LINK_DIRECTORIES
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
)
# set(
# MAIN_INCLUDE_DIRECTORIES
# ### Directories for MOC Sources ###
# ${CMAKE_BINARY_DIR}
# ${CMAKE_BINARY_DIR}/codes/Main
# ${CMAKE_BINARY_DIR}/codes/Core
# ${CMAKE_BINARY_DIR}/codes/View
# ${CMAKE_BINARY_DIR}/codes/Controller
# ${CMAKE_BINARY_DIR}/codes/Model
# ### Directories for headers ###
# ${CMAKE_SOURCE_DIR}
# ${CMAKE_SOURCE_DIR}/codes/Main
# ${CMAKE_SOURCE_DIR}/codes/Core
# ${CMAKE_SOURCE_DIR}/codes/View
# ${CMAKE_SOURCE_DIR}/codes/Controller
# ${CMAKE_SOURCE_DIR}/codes/Model
# )
# set(
# MAIN_LINK_LIBRARIES
# ${ITK_LIBRARIES}
# ${VTK_LIBRARIES}
# # ${VMTK_LIBRARIES}
# Qt5::Core
# Qt5::Widgets
# # Qt5::PrintSupport
# View
# Core
# Controller
# Model
# )
# include_directories(
# ${MAIN_INCLUDE_DIRECTORIES}
# )
link_directories(
${MAIN_LINK_DIRECTORIES}
)
add_subdirectory(codes/Main)
add_subdirectory(codes/View)
add_subdirectory(codes/Core)
add_subdirectory(codes/Controller)
add_subdirectory(codes/Model)
#add_subdirectory(codes/LumenExtraction)
add_subdirectory(codes/Widgets)
add_subdirectory(codes/Algorithm)