README 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. CMakeLists.txt -> File in each directory that contains classes, exe, etc
  2. CMakeLists.txt contains the following:
  3. # build targets
  4. WIN32_SOURCE_FILES =
  5. UNIX_SOURCE_FILES =
  6. ABSTRACT_CLASSES =
  7. SUBDIRS =
  8. EXECUTABLES =
  9. # make flags
  10. # make flags can use these varibles:
  11. # ${CMAKE_BINARY_DIR} The root of the build tree where the binaries are
  12. # ${CMAKE_SOURCE_ROOT} The root of the source tree where configure is
  13. INCLUDE_DIRECTORIES =
  14. LINK_DIRECTORIES =
  15. LINK_LIBRARIES = # use the same name as ME =
  16. WIN32_LIBRARIES =
  17. UNIX_LIBRARIES =
  18. # name of the library to build
  19. ME =
  20. # add make commands
  21. BEGIN MAKE VERBATIM
  22. ... # copy stuff into CMakeTargets.make directly
  23. LOCAL_BUILD_TARGETS = // These are done first before anything else
  24. END MAKE VERBATIM
  25. AUX_SOURCE_DIR =
  26. Windows / Visual Studio 6.0 programs
  27. CMakeSetup.exe -> window MFC based GUI for configure on windows
  28. CMakeSetupCMD.exe -> windows command line version of CMakeConfigure
  29. To Build on Windows:
  30. load CMake/Source/CMakeSetup.dsw
  31. Build it
  32. Run it
  33. Specify paths
  34. Load ITK.dsw
  35. Build Common, Numerics, then any of the many executables, or do a Batch build
  36. with debug only.
  37. Unix scripts and programs:
  38. configure -> run on unix to configure for build
  39. CMakeBuildTargets -> Unix program to read CMakeLists.txt and generate CMakeTargets.make
  40. makefile fragments:
  41. CMakeMaster.make -> main file to be included by makefiles
  42. CMakeVariables.make -> all make varibles are set in this file
  43. CMakeRules.make -> All build rules are here (except Simple Rules)
  44. CMakeSimpleRules.make -> simple build rules for .o to .cxx, this is separate to be able
  45. to build CMakeBuildTargets itself.
  46. CMakeLocal.make -> Place for hand configuration
  47. CMakeTargets.make -> generated rules for make style build in each directory
  48. MakefileTemplate.make -> master makefile template used by configure to generate Makefiles
  49. Note on adding targets inside "BEGIN/END MAKE VERBATIM" lines:
  50. By default, after "includ"ing a makefile, make will attempt to bring
  51. that included file up to date. So, when you first run configure, your
  52. makefiles will _not_ contain the target you have asked for inside the
  53. VERBATIM tags. However, it will be added by CMake when make attempts
  54. to bring the included make files up to date. NOTE: this will make
  55. your head hurt if you think about it too long. Just accept that it
  56. works to ask for a build target that does not yet exist.
  57. Unix install:
  58. In place:
  59. ./configure
  60. make
  61. Other directory:
  62. mkdir Insight-build
  63. cd Insight-build
  64. ../Insight/configure
  65. make
  66. TODO:
  67. FEATURES:
  68. Add include and directories to the build on windows.
  69. For unix just add them to the CMakeLocal.make.in
  70. Add a --with idea, sets a #define in the config.h file
  71. CLEANUP:
  72. Change ME to LIBRARY, and add PROJECT=
  73. Remove the rest of the ITK_* stuff
  74. move the libs used from the top into the testing...