-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
117 lines (85 loc) · 3.55 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
project(BraVi)
cmake_minimum_required(VERSION 2.6.2)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
set(MAJOR_VERSION 0)
set(MINOR_VERSION 1)
set(PATCH_VERSION 0)
set(VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})
find_package(VTK REQUIRED)
if(VTK_FOUND)
include(${VTK_USE_FILE})
message(STATUS "VTK Ok!")
endif(VTK_FOUND)
set(QT_MIN_VERSION 4.5.0)
find_package(Qt4 REQUIRED)
if(QT4_FOUND)
include(${QT_USE_FILE})
message(STATUS "QT4 Ok!")
include_directories(${QT_INCLUDE_DIR})
endif(QT4_FOUND)
# TODO FindNifti1.cmake
find_path(NIFTI_INCLUDE_DIRECTORIES nifti1_io.h
HINTS /usr/include
/usr/local/include
/usr/include/nifti
/usr/local/include/nifti)
find_library(NIFTI_IO_LIBRARY niftiio
HINTS /usr/lib
/usr/local/lib)
if(NIFTI_INCLUDE_DIRECTORIES AND NIFTI_IO_LIBRARY)
message(STATUS "Nifti Ok!")
include_directories(${NIFTI_INCLUDE_DIRECTORIES})
set(NIFTI_LIBRARIES ${NIFTI_IO_LIBRARY})
else(NIFTI_INCLUDE_DIRECTORIES AND NIFTI_IO_LIBRARY)
message(FATAL_ERROR "Nifti library not found")
endif(NIFTI_INCLUDE_DIRECTORIES AND NIFTI_IO_LIBRARY)
if(WIN32)
option(SV_DICEVIEWER "Compile only the basic viewer without filters support" ON)
option(SV_NEUROLOGICALCONVENTION "Use neurological convention instead of radiological convention" OFF)
#option(SV_DEBUG "Debug" OFF)
option(SV_SIMPLEINTERFACE "Compile with fixed interface" ON)
mark_as_advanced(SV_SIMPLEINTERFACE)
option(SV_FASTLOAD "Speed up splash screen" OFF)
mark_as_advanced(SV_FASTLOAD)
option(SV_3_SURFACES "Opens up to 3 surfaces" OFF)
mark_as_advanced(SV_3_SURFACES)
else(WIN32)
option(SV_DICEVIEWER "Compile only the basic viewer without filters support" OFF)
option(SV_SIMPLEINTERFACE "Compile with fixed interface" ON)
option(SV_NEUROLOGICALCONVENTION "Use neurological convention instead of radiological convention" OFF)
#option(SV_DEBUG "Debug" ON)
option(SV_3_SURFACES "Opens up to 3 surfaces" ON)
mark_as_advanced(SV_3_SURFACES)
option(SV_FASTLOAD "Speed up splash screen" ON)
mark_as_advanced(SV_FASTLOAD)
endif(WIN32)
option(SV_SLICECONTROLS_2COL "Slice controls on 2 columns" ON)
mark_as_advanced(SV_SLICECONTROLS_2COL)
option(SV_ORTHOCONTROLS_3COL "Ortho slice controls on 3 columns" ON)
mark_as_advanced(SV_ORTHOCONTROLS_3COL)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# --- Package generation
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "BraVi, biomedical images and signals viewer." )
set(CPACK_PACKAGE_VENDOR "BioLab")
#set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt")
set(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
set(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
set(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "BraVi${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION})")
set(CPACK_PACKAGE_NAME BraVi)
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
endif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
set(CPACK_DEBIAN_PACKAGE_DEPENDS ${BraVi_dependencies})
set(CPACK_PACKAGE_CONTACT "Daniele E. Domenichelli")
set(CPACK_STRIP_FILES TRUE)
set(CPACK_GENERATOR DEB)
include(CPack)
add_subdirectory(src)