]> Creatis software - clitk.git/commitdiff
Use vvLib for compiling vv to avoid double compilation of vv files
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Tue, 17 May 2011 16:01:01 +0000 (18:01 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Tue, 17 May 2011 16:01:01 +0000 (18:01 +0200)
vv/CMakeLists.txt

index 90b3a69e673f6104b278c7b1b42239a148cf3629..d38a79e8c4287349b3a50ddd78ce1155c20c5456 100644 (file)
@@ -198,11 +198,14 @@ SET(foundationLibraries clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
 
 #=========================================================
 #Create binary and libs for tests
-SET(vvExternalLibs clitkSegmentationGgoLib clitkDicomRTStruct ${toolLibs} ${foundationLibraries} CACHE INTERNAL DOCSTRING)
-ADD_EXECUTABLE(vv ${vv_SRCS} vv.cxx ${vv_UI_CXX} ${EXE_ICON})
-ADD_DEPENDENCIES(vv clitkSegmentationGgoLib)
-target_link_libraries(vv ${vvExternalLibs})
-add_library(vvLib ${vv_SRCS} vv.cxx ${vv_UI_CXX} ${EXE_ICON})
+SET(vvExternalLibs clitkSegmentationGgoLib clitkDicomRTStruct ${toolLibs} ${foundationLibraries})
+
+ADD_LIBRARY(vvLib ${vv_SRCS} ${vv_UI_CXX})
+TARGET_LINK_LIBRARIES(vvLib ${vvExternalLibs})
+
+ADD_EXECUTABLE(vv vv.cxx ${EXE_ICON})
+TARGET_LINK_LIBRARIES(vv vvLib)
+
 
 #=========================================================
 # Install options (also used by CPack)