#Change PROJECT_NAME to the name of your project PROJECT(KWImage) #include some macros from another file... INCLUDE(IJMacros.txt) #The following lines are required to use Dart ENABLE_TESTING() INCLUDE(Dart) #Declare any external dependencies that your project may have here. #examples include: ITK, VTK, JPEG, PNG, OpenGL, ZLIB, Perl, Java #If you're not sure what name to use, look in the Modules directory of your #cmake install and check that a file named Find(Package).cmake exists SET(Required_Packages ITK VTK ) #this foreach loads all of the packages that you specified as required. #It shouldn't need to be modified. FOREACH(Package ${Required_Packages}) LOADPACKAGE(${Package}) ENDFOREACH(Package) SET(IO_SRCS vtkKWImage.cxx vtkKWImageIO.cxx ) #Set any libraries that your project depends on. #examples: ITKCommon, VTKRendering, etc SET(Libraries ITKCommon ITKBasicFilters ITKIO vtkIO vtkImaging ) # install devel files OPTION(INSTALL_DEVEL_FILES "Install C++ headers" ON) IF(INSTALL_DEVEL_FILES) FILE(GLOB develFiles *.h *.txx) FOREACH(f ${develFiles}) INSTALL_FILES(/include/InsightToolkit/BasicFilters FILES ${f}) ENDFOREACH(f) ENDIF(INSTALL_DEVEL_FILES) # option for wrapping OPTION(BUILD_WRAPPERS "Wrap library" OFF) IF(BUILD_WRAPPERS) SUBDIRS(Wrapping) ENDIF(BUILD_WRAPPERS) #the following block of code is an example of how to build an executable in #cmake. Unmodified, it will add an executable called "MyExe" to the project. #MyExe will be built using the files MyClass.h and MyClass.cxx, and it will #be linked to all the libraries you specified above. #You can build more than one executable per project IF(BUILD_TESTING) ADD_EXECUTABLE(vtkKWImageIOTest vtkKWImageIOTest.cxx ${IO_SRCS}) TARGET_LINK_LIBRARIES(vtkKWImageIOTest ${Libraries}) ADD_EXECUTABLE(vtkKWImageIOTest2 vtkKWImageIOTest2.cxx ${IO_SRCS}) TARGET_LINK_LIBRARIES(vtkKWImageIOTest2 ${Libraries}) ADD_TEST(Test1 vtkKWImageIOTest ${CMAKE_SOURCE_DIR}/images/ImageSignedChar.mhd 2) ADD_TEST(Test2 vtkKWImageIOTest ${CMAKE_SOURCE_DIR}/images/ImageFloat.mhd 10) ADD_TEST(Test3 vtkKWImageIOTest2 ${CMAKE_SOURCE_DIR}/images/ImageSignedChar.mhd ImageSignedCharCopy.mhd) ADD_TEST(Test4 vtkKWImageIOTest2 ${CMAKE_SOURCE_DIR}/images/ImageFloat.mhd ImageFloatCopy.mhd) ENDIF(BUILD_TESTING)