From 4bca63581f0e2e0ab2f4b90f0e81fef8b08c3841 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Tue, 17 May 2011 18:01:01 +0200 Subject: [PATCH] Use vvLib for compiling vv to avoid double compilation of vv files --- vv/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 90b3a69..d38a79e 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -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) -- 2.47.1