-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (52 loc) · 1.71 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
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
PROJECT(MedicalImageRead)
FIND_PATH(QT_DIR "" "" NO_DEFAULT_PATH)
SET(CMAKE_PREFIX_PATH "${QT_DIR}")
FIND_PATH(VTK_DIR_ROOT "" "" NO_DEFAULT_PATH)
IF(VTK_DIR_ROOT)
SET(VTK_DIR "${VTK_DIR_ROOT}")
ELSE()
SET(VTK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Thirdparty/$(PlatformName)/VTK")
ENDIF()
OPTION(LIMIT_VERSION "limit version" OFF)
IF(WIN32)
FIND_FILE(TEMPLATE_RC_FILE "" "" NO_DEFAULT_PATH)
IF(TEMPLATE_RC_FILE)
SET(RC_FILE "${TEMPLATE_RC_FILE}")
ELSE()
SET(RC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/TemplateFile/Template.rc")
ENDIF()
IF (NOT PROJECT_VERSION)
SET(PROJECT_VERSION 1)
ENDIF()
IF (NOT VERSION_MINOR)
SET(VERSION_MINOR 0)
ENDIF()
IF (NOT VERSION_PATCH)
SET(VERSION_PATCH 11101)
ENDIF()
IF (NOT SVN_VERSION)
SET(SVN_VERSION 1)
ENDIF()
IF (NOT APP_PRODUCTNAME)
SET(APP_PRODUCTNAME TODO-APPNAME)
ENDIF()
ENDIF(WIN32)
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG)
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG)
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
# ΪÁËoutputÉèÖÃ
SET(Bin_Root "${CMAKE_CURRENT_SOURCE_DIR}/Bin/$(PlatformName)")
SET(Lib_Root "${CMAKE_CURRENT_SOURCE_DIR}/Lib/$(PlatformName)")
SET(ConfigurationName "$(ConfigurationName)")
INCLUDE_DIRECTORIES(
${VTK_DIR}/include/vtk-6.0
)
LINK_DIRECTORIES(
${VTK_DIR}/lib/${ConfigurationName}
)
set(CMAKE_AUTOMOC ON)
ADD_SUBDIRECTORY(Source)