INCLUDE(${CMAKE_SOURCE_DIR}/IJMacros.txt) #Change PROJECT_NAME to the name of your project PROJECT(KWMeshVisu) #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 KWWidgets ) #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) #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 SET(CurrentExe "KWMeshVisu") SET(LIB_NAME "vtkKWMeshVisuLib") SET(LIB_SRCS "vtkKWMeshVisu.cxx") SET(LIB_EXTRA_SRCS "itkMeshTovtkPolyData.cxx") INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) INCLUDE("${VTK_CMAKE_DIR}/vtkWrapTcl.cmake") IF("${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}" EQUAL "5.0") # VTK 5.0 compat SET(VTK_WRAP_TCL3_INIT_DIR "${VTK_SOURCE_DIR}/Wrapping") ENDIF("${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}" EQUAL "5.0") VTK_WRAP_TCL3(${LIB_NAME} LIB_TCL_SRCS ${LIB_SRCS} "") # Create the library (in static mode for convenience). ADD_LIBRARY(${LIB_NAME} STATIC ${LIB_TCL_SRCS} ${LIB_SRCS} ${LIB_EXTRA_SRCS}) # The name of our executable and the corresponding source file. SET(EXE_SRCS "${CurrentExe}.cxx") # Create the executable, and link it against the KWWidgets libraries and our # own library. ADD_EXECUTABLE(${CurrentExe} WIN32 ${EXE_SRCS}) TARGET_LINK_LIBRARIES(${CurrentExe} ${KWWidgets_LIBRARIES} ${ITK_LIBRARIES} ${LIB_NAME}) #the following line is an example of how to add a test to your project. #Testname is the title for this particular test. ExecutableToRun is the #program which will be running this test. It can either be a part of this #project or an external executable. After that list any args that are needed #for this test. Include as many tests as you like. If your project doesn't have #any tests you can comment out or delete the following line. #ADD_TEST(CreateImage ImageCopy ${CMAKE_SOURCE_DIR}/img1.png) #ADD_TEST(CompareImage ImageCompare ${CMAKE_SOURCE_DIR}/img1.png ${CMAKE_SOURCE_DIR}/img1.png.base.png) #Once you're done modifying this template, you should rename it to "CMakeLists.txt"