]> Creatis software - clitk.git/blob - CMakeLists.txt
39ebae893effbc57023028c71c08b16dfdcf5e9f
[clitk.git] / CMakeLists.txt
1 #ADD_LIBRARY(clitkLBGSB STATIC clitkLBGSBOptimizer.cxx)
2 #=========================================================
3
4 INCLUDE(${PROJECT_SOURCE_DIR}/cmake/common.cmake)
5
6 #=========================================================
7
8 # Add Libraries used in vv and clitk to avoid recompilation
9 WRAP_GGO(clitkAffineRegistration_GGO_C clitkAffineRegistration.ggo)
10 ADD_LIBRARY(clitkAffineRegistrationLib 
11             clitkAffineRegistrationGenericFilter.cxx
12             ${clitkAffineRegistration_GGO_C}
13             clitkLBFGSBOptimizer.cxx
14             clitkGenericAffineTransform.cxx)
15
16 #=========================================================
17
18 IF(CLITK_BUILD_REGISTRATION)
19     ############################## registration algorithms
20     ADD_EXECUTABLE(clitkAffineRegistration clitkAffineRegistration.cxx)
21     TARGET_LINK_LIBRARIES(clitkAffineRegistration  clitkAffineRegistrationLib clitkCommon ${ITK_LIBRARIES})
22     SET(REGISTRATION_INSTALL clitkAffineRegistration)
23
24     WRAP_GGO(clitkDemonsDeformableRegistration_GGO_C clitkDemonsDeformableRegistration.ggo)
25     ADD_EXECUTABLE(clitkDemonsDeformableRegistration clitkDemonsDeformableRegistration.cxx ${clitkDemonsDeformableRegistration_GGO_C} clitkDemonsDeformableRegistrationGenericFilter.cxx)
26     TARGET_LINK_LIBRARIES(clitkDemonsDeformableRegistration ${ITK_LIBRARIES} clitkCommon)
27     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkDemonsDeformableRegistration)
28
29     WRAP_GGO(clitkBLUTDIR_GGO_C clitkBLUTDIR.ggo)
30     ADD_EXECUTABLE(clitkBLUTDIR  clitkBLUTDIR.cxx clitkBLUTDIRGenericFilter.cxx ${clitkBLUTDIR_GGO_C} clitkLBFGSBOptimizer.cxx )
31     TARGET_LINK_LIBRARIES(clitkBLUTDIR clitkCommon ${ITK_LIBRARIES} )
32     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkBLUTDIR)
33
34     WRAP_GGO(clitkShapedBLUTSpatioTemporalDIR_GGO_C clitkShapedBLUTSpatioTemporalDIR.ggo)
35     ADD_EXECUTABLE(clitkShapedBLUTSpatioTemporalDIR  clitkShapedBLUTSpatioTemporalDIR.cxx clitkShapedBLUTSpatioTemporalDIRGenericFilter.cxx  ${clitkShapedBLUTSpatioTemporalDIR_GGO_C} clitkLBFGSBOptimizer.cxx)
36     TARGET_LINK_LIBRARIES(clitkShapedBLUTSpatioTemporalDIR clitkCommon ${ITK_LIBRARIES})
37     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkShapedBLUTSpatioTemporalDIR)
38
39
40     ############################## registration-related tools to process points, bsplines, vf and image pyramids
41     WRAP_GGO(clitkConvertPointList_GGO_C clitkConvertPointList.ggo)
42     ADD_EXECUTABLE(clitkConvertPointList clitkConvertPointList.cxx  ${clitkConvertPointList_GGO_C})
43     TARGET_LINK_LIBRARIES(clitkConvertPointList ${ITK_LIBRARIES} clitkCommon )
44     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkConvertPointList)
45
46     WRAP_GGO(clitkSelectPoints_GGO_C clitkSelectPoints.ggo)
47     ADD_EXECUTABLE(clitkSelectPoints clitkSelectPoints.cxx clitkSelectPointsGenericFilter.cxx  ${clitkSelectPoints_GGO_C})
48     TARGET_LINK_LIBRARIES(clitkSelectPoints clitkCommon ${ITK_LIBRARIES})
49     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkSelectPoints)
50
51     WRAP_GGO(clitkPointTrajectory_GGO_C clitkPointTrajectory.ggo)
52     ADD_EXECUTABLE(clitkPointTrajectory  clitkPointTrajectory.cxx clitkPointTrajectoryGenericFilter.cxx  ${clitkPointTrajectory_GGO_C})
53     TARGET_LINK_LIBRARIES(clitkPointTrajectory clitkCommon ${ITK_LIBRARIES})
54     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkPointTrajectory)
55
56     WRAP_GGO(clitkCalculateTRE_GGO_C clitkCalculateTRE.ggo)
57     ADD_EXECUTABLE(clitkCalculateTRE clitkCalculateTRE.cxx clitkCalculateTREGenericFilter.cxx ${clitkCalculateTRE_GGO_C})
58     TARGET_LINK_LIBRARIES(clitkCalculateTRE clitkCommon ${ITK_LIBRARIES} )
59     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkCalculateTRE)
60
61     WRAP_GGO(clitkMatrixTransformToVF_GGO_C clitkMatrixTransformToVF.ggo)
62     ADD_EXECUTABLE(clitkMatrixTransformToVF clitkMatrixTransformToVF.cxx clitkMatrixTransformToVFGenericFilter.cxx  ${clitkMatrixTransformToVF_GGO_C})
63     TARGET_LINK_LIBRARIES(clitkMatrixTransformToVF ${ITK_LIBRARIES} clitkCommon)
64     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkMatrixTransformToVF)
65
66     WRAP_GGO(clitkConvertBSplineDeformableTransformToVF_GGO_C clitkConvertBSplineDeformableTransformToVF.ggo)
67     ADD_EXECUTABLE(clitkConvertBSplineDeformableTransformToVF  clitkConvertBSplineDeformableTransformToVF.cxx clitkConvertBSplineDeformableTransformToVFGenericFilter.cxx  ${clitkConvertBSplineDeformableTransformToVF_GGO_C})
68     TARGET_LINK_LIBRARIES(clitkConvertBSplineDeformableTransformToVF clitkCommon  ${ITK_LIBRARIES})
69     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkConvertBSplineDeformableTransformToVF)
70
71     WRAP_GGO(clitkMultiResolutionPyramid_GGO_C clitkMultiResolutionPyramid.ggo)
72     ADD_EXECUTABLE(clitkMultiResolutionPyramid  clitkMultiResolutionPyramid.cxx clitkMultiResolutionPyramidGenericFilter.cxx ${clitkMultiResolutionPyramid_GGO_C})
73     TARGET_LINK_LIBRARIES(clitkMultiResolutionPyramid clitkCommon  ${ITK_LIBRARIES})
74     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkMultiResolutionPyramid)
75
76     WRAP_GGO(clitkBSplinePyramid_GGO_C clitkBSplinePyramid.ggo)
77     ADD_EXECUTABLE(clitkBSplinePyramid  clitkBSplinePyramid.cxx clitkBSplinePyramidGenericFilter.cxx ${clitkBSplinePyramid_GGO_C})
78     TARGET_LINK_LIBRARIES(clitkBSplinePyramid  clitkCommon  ${ITK_LIBRARIES})
79     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkBSplinePyramid)
80
81     WRAP_GGO(clitkResampleBSplineDeformableTransform_GGO_C clitkResampleBSplineDeformableTransform.ggo)
82     ADD_EXECUTABLE(clitkResampleBSplineDeformableTransform  clitkResampleBSplineDeformableTransform.cxx clitkResampleBSplineDeformableTransformGenericFilter.cxx ${clitkResampleBSplineDeformableTransform_GGO_C})
83     TARGET_LINK_LIBRARIES(clitkResampleBSplineDeformableTransform clitkCommon ${ITK_LIBRARIES})
84     SET(REGISTRATION_INSTALL ${REGISTRATION_INSTALL} clitkResampleBSplineDeformableTransform)
85
86     SET_TARGET_PROPERTIES(${REGISTRATION_INSTALL} PROPERTIES INSTALL_RPATH "${VTK_DIR}:${ITK_DIR}" )  
87     INSTALL (TARGETS ${REGISTRATION_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
88
89 ENDIF(CLITK_BUILD_REGISTRATION)
90