forked from NIRALUser/DTIFiberTractStatistics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DTIAtlasFiberAnalyzer.cmake
67 lines (50 loc) · 1.84 KB
/
DTIAtlasFiberAnalyzer.cmake
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
project( DTIAtlasFiberAnalyzerProject )
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
include( CTest )
endif(BUILD_TESTING)
SETIFEMPTY( ARCHIVE_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib/static )
SETIFEMPTY( LIBRARY_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/lib )
SETIFEMPTY( RUNTIME_DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/bin )
SETIFEMPTY(INSTALL_RUNTIME_DESTINATION bin)
SETIFEMPTY(INSTALL_LIBRARY_DESTINATION lib)
SETIFEMPTY(INSTALL_ARCHIVE_DESTINATION lib)
set( install_dir ${INSTALL_RUNTIME_DESTINATION} )
find_package(SlicerExecutionModel REQUIRED)
include(${SlicerExecutionModel_USE_FILE})
FIND_PACKAGE(ITK REQUIRED)
include(${ITK_USE_FILE})
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
if( VTK_MAJOR_VERSION VERSION_LESS 6 AND NOT VTK_USE_QT )
message( FATAL_ERROR "DTIAtlasFiberAnalyzer needs VTK to be built with Qt" )
endif()
if( VTK_MAJOR_VERSION VERSION_GREATER 5 )
list( FIND VTK_MODULES_ENABLED "vtkGUISupportQt" vtkQtpos )
if( vtkQtpos LESS 0 )
message( FATAL_ERROR "DTIAtlasFiberAnalyzer needs VTK to be built with Qt" )
endif()
endif()
find_package(Qt5 COMPONENTS Core Gui Network Xml REQUIRED)
add_definitions(${Qt5Widgets_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
option(EXECUTABLES_ONLY "Build only executables (CLI)" ON)
if( ${EXECUTABLES_ONLY} )
set( STATIC "EXECUTABLE_ONLY" )
set( STATIC_LIB "STATIC" )
else()
set( STATIC_LIB "SHARED" )
endif()
add_subdirectory( Applications )
find_package(DTIProcess REQUIRED)
find_package(FADTTS REQUIRED)
set( ToolsList
${DTIProcess_fiberprocess_EXECUTABLE}
${FADTTSter_EXECUTABLE}
)
if( EXECUTABLES_ONLY )
foreach( tool ${ToolsList})
message(STATUS "Install: ${tool}")
install(PROGRAMS ${tool} DESTINATION ${INSTALL_RUNTIME_DESTINATION})
endforeach()
endif()