Difference between revisions of "CMake"

From Inkscape Wiki
Jump to navigation Jump to search
Line 8: Line 8:
 
Those features include:
 
Those features include:
  
     * Supports complex, large build environments. CMake has been proven in several large projects (KDE, ParaView, SecondLife)
+
     * Supports complex, large build environments. CMake has been proven in several large projects (KDE, ParaView, SecondLife, Scribus)
 
     * Generates native build files (e.g., makefiles on Unix; workspaces/projects on MS Visual C++). Therefore, standard tools can be used on any platform/compiler configuration.
 
     * Generates native build files (e.g., makefiles on Unix; workspaces/projects on MS Visual C++). Therefore, standard tools can be used on any platform/compiler configuration.
 
     * Powerful system introspection abilities including the ability to find installed include files, libraries and executables. Also the ability to test the compiler for supported features.
 
     * Powerful system introspection abilities including the ability to find installed include files, libraries and executables. Also the ability to test the compiler for supported features.
Line 63: Line 63:
 
     # this adds a single sub-directory
 
     # this adds a single sub-directory
 
     ADD_SUBDIRECTORY(parameter)
 
     ADD_SUBDIRECTORY(parameter)
 +
 +
== Testing/Using ==
 +
 +
Experience with Scribus '''strongly''' suggests using an "out of source"build arrangement. E.g.
 +
 +
<pre>
 +
mkdir buildinkscape
 +
cd buildinkscape
 +
cmake ./path/to/inkscape/sources
 +
</pre>
 +
 +
References:
 +
[http://docs.scribus.net/index.php?lang=en&page=install4 Installing Scribus with Cmake] <br />
 +
[http://docs.scribus.net/index.php?lang=en&page=install5 Installing with CMake on OSX]

Revision as of 08:44, 31 March 2008

== Work is a on going to get this build system functional. ==


Cmake is a cross-platform build system know to work on all major platforms we support(*nix, Windows, OSX).

CMake is an extensible, open-source system that has many powerful features. Those features include:

   * Supports complex, large build environments. CMake has been proven in several large projects (KDE, ParaView, SecondLife, Scribus)
   * Generates native build files (e.g., makefiles on Unix; workspaces/projects on MS Visual C++). Therefore, standard tools can be used on any platform/compiler configuration.
   * Powerful system introspection abilities including the ability to find installed include files, libraries and executables. Also the ability to test the compiler for supported features.
   * Integrated testing system called CTest.
   * Integrated packaging system called CPack.
   * Easy integration with CDash and Dart dashboard servers.
   * Powerful scripting language with simple syntax.
   * Supports in-place and out-of-place builds. Multiple compilation trees are possible from a single source tree.
   * Can be easily extended to add new features.
   * CMake is open source, under a liberal BSD license.
   * CMake operates with a cache designed to be interfaced with a graphical editor. The cache provides optional interaction to conditionally control the build process.
   * Ability to create Mac OSX Frameworks and Application Bundles.
   * Supports adding complex custom rules to the build.


How you can help.

Right now we are going through all of the directories and sub-directories in the src folder and add a CMakeLists.txt file

SIMPLE CmakeLists.txt

   SET(libavoid_SRC
   connector.cpp
   geometry.cpp
   graph.cpp
   makepath.cpp
   polyutil.cpp
   region.cpp
   router.cpp
   shape.cpp
   static.cpp
   timer.cpp
   vertices.cpp
   visibility.cpp
   )

SIMPLE with single sub-directory Cmakelists.txt

   SET(libavoid_SRC
   connector.cpp
   geometry.cpp
   graph.cpp
   makepath.cpp
   polyutil.cpp
   region.cpp
   router.cpp
   shape.cpp
   static.cpp
   timer.cpp
   vertices.cpp
   visibility.cpp
   #Add our subdirectory sourcelist Var
   ${libavoid_parameter_SRC}
   )
   # this adds a single sub-directory
   ADD_SUBDIRECTORY(parameter)

Testing/Using

Experience with Scribus strongly suggests using an "out of source"build arrangement. E.g.

mkdir buildinkscape
cd buildinkscape
cmake ./path/to/inkscape/sources

References: Installing Scribus with Cmake
Installing with CMake on OSX