From cb863348039bb6f1885ba0173840ba2cd0cb91ca Mon Sep 17 00:00:00 2001 From: schaerer Date: Wed, 13 Oct 2010 15:20:04 +0000 Subject: [PATCH] mechanism for handling tool dependencies in a modular way. We still need to describe those dependencies more finely --- registration/CMakeLists.txt | 5 +++-- vv/CMakeLists.txt | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/registration/CMakeLists.txt b/registration/CMakeLists.txt index b7cca3f..d720e71 100644 --- a/registration/CMakeLists.txt +++ b/registration/CMakeLists.txt @@ -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) diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 796aacd..86fc064 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -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) -- 2.47.1