Difference between revisions of "Modifying CMake Files"

From Second Life Wiki
Jump to navigation Jump to search
(Merged back into main CMake page)
 
Line 1: Line 1:
Linden Lab switched to [http://www.cmake.org/ CMake] for building the Second Life viewer (starting with version 1.21).  This page describes how to make modifications to CMake files.  If you are just interested in building the viewer (using CMake of course), see [[Building the viewer with CMake]]
#REDIRECT [[CMake]]
 
== Introduction to CMake ==
 
CMake has the advantage of generating per-platform build files for us.  On Linux, it will generate Makefiles and KDevelop project files.  On OS X, it will generate Makefiles and Xcode project files.  On Windows, it will generate Makefiles (for nmake) and Visual Studio project files.
 
All of the "smarts" stay in the CMake files, so there's just one authoritative source of build knowledge.  This means that people can use the development environment they prefer without having to worry so much about breaking other people's builds.  Because CMake files are plain text, merging is easy, as is maintaining experimental patches.
 
CMake tells your build system how to rebuild its input files when it detects changes to CMake's configuration files.  This means that you only need to run <code>cmake</code> once.  After that, <code>make</code> or your IDE should keep the CMake files and its own project files in sync for you.
 
== What to modify ==
 
'''TODO'' - discuss structure of CMake files
 
= Patching guidelines =
 
We welcome your patches!  We can't test on every permutation of platform, compiler, IDE, and libraries, so if you have problems that you can fix, please contribute your fixes and we'll do our best to ensure that you only have to fix problems once.
 
If you're sending patches in, please follow a few simple guidelines:
* Use regular context diffs.  If you're attaching a patch, please try to make sure it has Unix line endings and pathnames, not Windows.
* Follow the existing coding style in the CMake files.  I don't like code shouting at me, so prefer lowercase letters.
* One logical change per patch.
* Use spaces for indentation, not tabs.
 
See [[Submitting patches]] for more details.
 
[[Category:Open Source Portal]]
[[Category:Compiling viewer]]

Latest revision as of 17:00, 24 January 2009

Redirect to: