X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FCMakeLists.txt;h=84ffae065db79a01b961670ff500f14ab79e9c43;hb=acdc20ec4afc95db1db29bf8d885a3b72c9c7ee0;hp=e9cd2d260b858ebed1333bb12ecd458d7c5266c2;hpb=c4663d678e8b23c79ab640ad01dbf15b8bee520d;p=clitk.git diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index e9cd2d2..84ffae0 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -19,6 +19,7 @@ SET(vv_TOOLS vvToolResample # vvToolExtractPatient # vvToolExtractLung + vvToolStructureSetManager vvToolMIP vvToolConvert ## with dummy vvToolConvert.ui @@ -62,7 +63,6 @@ SET(vv_COMMON_WITH_UI vvToolWidgetBase vvToolSimpleInputSelectorWidget vvToolInputSelectorWidget - vvToolStructureSetManager vvRegisterForm ) @@ -94,6 +94,8 @@ SET(vv_SRCS vvImageContour.cxx vvBinaryImageOverlayActor.cxx vvStructureSetActor.cxx + vvSaveState.cxx + vvReadState.cxx vvROIActor.cxx vvBlendImageActor.cxx vvToolManager.cxx @@ -115,12 +117,10 @@ QT4_WRAP_CPP(vv_SRCS vvStructureSetActor.h vvROIActor.h vvToolCreatorBase.h - vvRegisterForm.h ) QT4_WRAP_UI(vv_UI_CXX qt_ui/vvHelpDialog.ui - qt_ui/vvRegisterForm.ui qt_ui/vvDocumentation.ui qt_ui/vvDicomSeriesSelector.ui qt_ui/vvDummyWindow.ui #For testing @@ -128,17 +128,28 @@ QT4_WRAP_UI(vv_UI_CXX QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc) -#Add the autotools and the common files ui +# Add the autotools in the header vvToolsList.h for initialization of the dummy +# variables in vv.cxx for the tools contained in vvLib +file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) +foreach(tool ${vv_TOOLS}) + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "#include \"${tool}.h\"\n") + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "extern const vvToolCreator<${tool}> *dummy${tool};\n") + FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "const vvToolCreator<${tool}> *dummy${tool}2 = dummy${tool};\n\n") +endforeach(tool) + +# Add the autotools and the common files ui foreach(tool ${vv_TOOLS} ${vv_COMMON_WITH_UI}) SET(vv_SRCS ${vv_SRCS} ${tool}.cxx) QT4_WRAP_CPP(vv_SRCS ${tool}.h) QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) endforeach(tool) -#Add the common source files + +# Add the common source files foreach(tool ${vv_COMMON}) SET(vv_SRCS ${vv_SRCS} ${tool}.cxx) QT4_WRAP_CPP(vv_SRCS ${tool}.h) endforeach(tool) + # if Windows and Qt was built as a static lib then don't set QT_DLL flag SET(QT_STATIC 0) IF (WIN32) @@ -194,7 +205,8 @@ SET(foundationLibraries clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid) #========================================================= #Create binary and libs for tests -SET(vvExternalLibs clitkSegmentationGgoLib clitkDicomRTStruct ${toolLibs} ${foundationLibraries}) +SET(vvExternalLibs ${QT_QTNETWORK_LIBRARY} clitkSegmentationGgoLib clitkDicomRTStruct ${toolLibs} ${foundationLibraries}) +# QtNetwork is required by vvRegisterForm ADD_LIBRARY(vvLib ${vv_SRCS} ${vv_UI_CXX}) TARGET_LINK_LIBRARIES(vvLib ${vvExternalLibs}) @@ -205,6 +217,7 @@ ELSE(WIN32) ADD_EXECUTABLE(vv vv.cxx) ENDIF(WIN32) +#TARGET_LINK_LIBRARIES(vv vvLib) TARGET_LINK_LIBRARIES(vv vvLib) @@ -212,7 +225,7 @@ TARGET_LINK_LIBRARIES(vv vvLib) # Install options (also used by CPack) IF(UNIX AND NOT APPLE) SET_TARGET_PROPERTIES(vv - PROPERTIES INSTALL_RPATH "${VTK_DIR}:${ITK_DIR}" ) + PROPERTIES INSTALL_RPATH "${VTK_DIR}:${ITK_DIR}") INSTALL (TARGETS vv DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE) # INSTALL (FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/ducky.png DESTINATION .) @@ -241,7 +254,7 @@ SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/License.txt") SET(CPACK_PACKAGE_VERSION_MAJOR "1") SET(CPACK_PACKAGE_VERSION_MINOR "2") -SET(CPACK_PACKAGE_VERSION_PATCH "0") +SET(CPACK_PACKAGE_VERSION_PATCH "2") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "vv") SET(CPACK_STRIP_FILES TRUE) @@ -265,5 +278,5 @@ ENDIF(WIN32) INCLUDE(CPack) #========================================================= #========================================================= -configure_file(vvCommon.h.in vvCommon.h) +configure_file(vvConfiguration.h.in vvConfiguration.h) #=========================================================