]> Creatis software - clitk.git/commitdiff
mechanism for handling tool dependencies in a modular way.
authorschaerer <schaerer>
Wed, 13 Oct 2010 15:20:04 +0000 (15:20 +0000)
committerschaerer <schaerer>
Wed, 13 Oct 2010 15:20:04 +0000 (15:20 +0000)
We still need to describe those dependencies more finely

registration/CMakeLists.txt
vv/CMakeLists.txt

index b7cca3f9590d34f5ba17377ff04690ef8d6c1dc7..d720e717bfefe632a7b39ba11ed05410d1e3e509 100644 (file)
@@ -10,14 +10,15 @@ FOREACH(clitkTool clitkAffineRegistration)
     WRAP_GGO(${clitkTool}_GGO_C ${clitkTool}.ggo)
     SET(GGO_C_FILES ${GGO_C_FILES} ${${clitkTool}_GGO_C})
 ENDFOREACH(clitkTool)
-ADD_LIBRARY(clitkRegistrationGgoLib ${GGO_C_FILES} clitkAffineRegistrationGenericFilter.cxx clitkLBFGSBOptimizer.cxx clitkGenericAffineTransform.cxx)
+ADD_LIBRARY(clitkRegistrationGgoLib ${GGO_C_FILES})
+ADD_LIBRARY(clitkAffineRegistrationLib clitkAffineRegistrationGenericFilter.cxx clitkLBFGSBOptimizer.cxx clitkGenericAffineTransform.cxx)
 
 #=========================================================
 
 IF(CLITK_BUILD_REGISTRATION)
     ############################## registration algorithms
     ADD_EXECUTABLE(clitkAffineRegistration clitkAffineRegistration.cxx)
-    TARGET_LINK_LIBRARIES(clitkAffineRegistration  clitkRegistrationGgoLib clitkCommon ITKIO ITKNumerics ITKStatistics)
+    TARGET_LINK_LIBRARIES(clitkAffineRegistration  clitkAffineRegistrationLib clitkRegistrationGgoLib clitkCommon ITKIO ITKNumerics ITKStatistics)
 
     WRAP_GGO(clitkDemonsDeformableRegistration_GGO_C clitkDemonsDeformableRegistration.ggo)
     ADD_EXECUTABLE(clitkDemonsDeformableRegistration clitkDemonsDeformableRegistration.cxx ${clitkDemonsDeformableRegistration_GGO_C} clitkDemonsDeformableRegistrationGenericFilter.cxx)
index 796aacd305ad92c05b783334721bc996010325da..86fc0649e10810d5cbe57c640247bf50072244d7 100644 (file)
@@ -7,6 +7,7 @@ if(COMMAND cmake_policy)
 endif(COMMAND cmake_policy)
 #=========================================================
 
+#List of vv tools to compile
 SET(vv_TOOLS
   vvToolWidgetBase
 #  vvToolWidgetWithStepsBase
@@ -26,6 +27,8 @@ SET(vv_TOOLS
   # vvToolPlastimatch
 #  vvToolConnectedComponentLabeling
 )
+#dependencies of the tools
+SET(vvToolRigidReg_LIBS clitkAffineRegistrationLib)
 
 #=========================================================
 # List of vv source files
@@ -199,6 +202,10 @@ clitkRegistrationGgoLib
 clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
 
 #=========================================================
+#Add each tool's dependencies
+foreach(tool ${vv_TOOLS})
+    target_link_libraries(vv ${${tool}_LIBS})
+endforeach(tool)
 
 #=========================================================
 # Install options (also used by CPack)