-
Notifications
You must be signed in to change notification settings - Fork 0
/
UnbiasedNonLocalMeans.cmake
84 lines (67 loc) · 3.7 KB
/
UnbiasedNonLocalMeans.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
#-----------------------------------------------------------------------------
# Update CMake module path
#------------------------------------------------------------------------------
################################################################################
find_package(SlicerExecutionModel REQUIRED GenerateCLP)
include(${GenerateCLP_USE_FILE})
include(${SlicerExecutionModel_USE_FILE})
include(${SlicerExecutionModel_CMAKE_DIR}/SEMMacroBuildCLI.cmake)
#-----------------------------------------------------------------------------
find_package(ITK 4.7 REQUIRED)
if(Slicer_BUILD_BRAINSTOOLS)
set(ITK_NO_IO_FACTORY_REGISTER_MANAGER 1)
endif()
include(${ITK_USE_FILE})
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
enable_testing()
include(CTest)
option(BUILD_CMPB_VERSIONS "Build the exact same source code used for the CMPB paper" OFF)
if( BUILD_CMPB_VERSIONS )
add_subdirectory( cmpb.source.code )
endif( BUILD_CMPB_VERSIONS )
# For Slicer 4 builds, simply call the standard macro:
if(Slicer_BINARY_DIR) # This variable exits only for Slicer4
SEMMacroBuildCLI(
NAME ${PROJECT_NAME}
LOGO_HEADER ${PROJECT_SOURCE_DIR}/ModuleLogo.h
TARGET_LIBRARIES ${ITK_LIBRARIES} ModuleDescriptionParser
LINK_DIRECTORIES ${ModuleDescriptionParser_BINARY_DIR}
INCLUDE_DIRECTORIES ${SlicerBaseCLI_SOURCE_DIR} ${Slicer_SOURCE_DIR}/Applications/CLI/DiffusionApplications/DiffusionApplicationsCommon
${SlicerBaseCLI_BINARY_DIR}
RUNTIME_OUTPUT_DIRECTORY ${${CMAKE_PROJECT_NAME}_CLI_RUNTIME_OUTPUT_DIRECTORY}
LIBRARY_OUTPUT_DIRECTORY ${${CMAKE_PROJECT_NAME}_CLI_LIBRARY_OUTPUT_DIRECTORY}
ARCHIVE_OUTPUT_DIRECTORY ${${CMAKE_PROJECT_NAME}_CLI_ARCHIVE_OUTPUT_DIRECTORY}
INSTALL_RUNTIME_DESTINATION ${${CMAKE_PROJECT_NAME}_CLI_INSTALL_RUNTIME_DESTINATION}
INSTALL_LIBRARY_DESTINATION ${${CMAKE_PROJECT_NAME}_CLI_INSTALL_LIBRARY_DESTINATION}
INSTALL_ARCHIVE_DESTINATION ${${CMAKE_PROJECT_NAME}_CLI_INSTALL_ARCHIVE_DESTINATION}
)
else(Slicer_BINARY_DIR)
#set(EXTRA_HEADERS itkNLMFilter.txx LSDerivatives/itkLSDerivatives.txx)
#set(CLP UnbiasedNonLocalMeans)
#set ( ${CLP}_SOURCE ${CLP}.cxx )
#CONFIGURESTANDALONEORSLICERPROPERTIES(${CLP} ${CLP}.xml "${${CLP}_SOURCE}" "" "${EXTRA_HEADERS}")
#target_link_libraries( ${CLP} ${ITK_LIBRARIES} )
#INSTALL(TARGETS UnbiasedNonLocalMeans DESTINATION bin)
SEMMacroBuildCLI(
NAME ${PROJECT_NAME}
EXECUTABLE_ONLY
LOGO_HEADER ${PROJECT_SOURCE_DIR}/ModuleLogo.h
TARGET_LIBRARIES ${ITK_LIBRARIES} ModuleDescriptionParser
LINK_DIRECTORIES ${ModuleDescriptionParser_BINARY_DIR}
INCLUDE_DIRECTORIES ${SlicerBaseCLI_SOURCE_DIR} ${Slicer_SOURCE_DIR}/Applications/CLI/DiffusionApplications/DiffusionApplicationsCommon
RUNTIME_OUTPUT_DIRECTORY ${${CMAKE_PROJECT_NAME}_CLI_RUNTIME_OUTPUT_DIRECTORY}
LIBRARY_OUTPUT_DIRECTORY ${${CMAKE_PROJECT_NAME}_CLI_LIBRARY_OUTPUT_DIRECTORY}
ARCHIVE_OUTPUT_DIRECTORY ${${CMAKE_PROJECT_NAME}_CLI_ARCHIVE_OUTPUT_DIRECTORY}
INSTALL_RUNTIME_DESTINATION ${${CMAKE_PROJECT_NAME}_CLI_INSTALL_RUNTIME_DESTINATION}
INSTALL_LIBRARY_DESTINATION ${${CMAKE_PROJECT_NAME}_CLI_INSTALL_LIBRARY_DESTINATION}
INSTALL_ARCHIVE_DESTINATION ${${CMAKE_PROJECT_NAME}_CLI_INSTALL_ARCHIVE_DESTINATION}
)
endif(Slicer_BINARY_DIR)
#-----------------------------------------------------------------------------
# Define list of module names
#-----------------------------------------------------------------------------
if (BUILD_TESTING)
add_subdirectory(TestSuite)
endif (BUILD_TESTING)