X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FCMakeLists.txt;h=320e1948b4c52c09cc451ff3f3cc4e4bc3ab791a;hb=c2e0628b1d9f0940ac192ff3683c3ede5d01ceb3;hp=9f449b993cde98b21a0d1c63677b621435e9f187;hpb=40fa87851b8937cb8cd98699e9e8c5dd2ef5f932;p=clitk.git diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 9f449b9..320e194 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -12,7 +12,7 @@ endif(COMMAND cmake_policy) #List of vv tools to compile SET(vv_TOOLS vvToolMedianFilter -# vvToolRigidReg ## Very long to compile + vvToolRigidReg vvToolCropImage vvToolBinarize vvToolImageArithm @@ -32,7 +32,6 @@ SET(vv_TOOLS # dependencies of the tools # Future issues : when tool depend on other tools ... how to manage that ? # >> add the relevant $_LIBS variable to the tool that has dependencies? -SET(vvToolRigidReg_LIBS clitkAffineRegistrationLib) SET(vvToolBinarize_LIBS clitkBinarizeImageLib) SET(vvToolResample_LIBS clitkResampleImageLib) SET(vvToolConvert_LIBS clitkImageConvertLib) @@ -94,6 +93,8 @@ SET(vv_SRCS vvImageContour.cxx vvBinaryImageOverlayActor.cxx vvStructureSetActor.cxx + vvSaveState.cxx + vvReadState.cxx vvROIActor.cxx vvBlendImageActor.cxx vvToolManager.cxx @@ -128,12 +129,14 @@ QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc) # 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}) +if(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) + 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) + endforeach(tool) +endif(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) # Add the autotools and the common files ui foreach(tool ${vv_TOOLS} ${vv_COMMON_WITH_UI}) @@ -203,7 +206,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}) @@ -214,6 +218,7 @@ ELSE(WIN32) ADD_EXECUTABLE(vv vv.cxx) ENDIF(WIN32) +#TARGET_LINK_LIBRARIES(vv vvLib) TARGET_LINK_LIBRARIES(vv vvLib) @@ -221,7 +226,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 .) @@ -250,7 +255,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 "1") +SET(CPACK_PACKAGE_VERSION_PATCH "2") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "vv") SET(CPACK_STRIP_FILES TRUE)