|(One intermediate revision by one other user not shown)|
<!-- documentation manual man information help tutorial -->
Welcome to CMake, the cross-platform, open-source make system. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation.
You will find here not only documentation for CMake, but also for CPack and CTest.
==Primary Resources - Look here first! ==
* Where can I [https://cmake.org/HTML/Download.html download CMake]?
* [https://cmake.org/documentation/ CMake Documentation]
* [https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html CMake Variables]
* [https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html Structure of a CMake Build System]
* [[CMake FAQ| FAQ (Frequently asked questions)]]
* [https://cmake.org/mailman/listinfo/cmake CMake Mailing List] (for searchable archives see [[CMake_FAQ#Where_can_I_find_searchable_CMake_Mailing_Archives | CMake FAQ ]])
* [[https://cmake.org/cmake/help/latest/release/index.html|CMake Release Notes]]
* [https://cmake.org/cmake/help/latest/manual/cmake-variables.7.html CMake Variables]
* [https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html?highlight=properties List of CMake Properties]
====The CMake Language====
* [https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#syntax A quick introduction to CMake syntax]
* [[CMake:VariablesListsStrings| On variables, lists, strings, maps, regexps, etc.]]
* [[CMake/Language Syntax | Language syntax]]
* [[CMake Cross Compiling| Cross compiling]]
* [[CMake:How_To_Write_Platform_Checks| How to write platform checks with CMake]]
* [[CMake:How_To_Find_Libraries | How to find libraries]]
* [[CMake:Install Commands| How to install things]]
* [[CMake RPATH handling|RPATH handling]]
* [[CMake Editors Support|Editors/IDEs with CMake syntax support]]
* [[BuildingWinDLL| How to export symbols from a Windows DLL for the non-Windows Developer]]
* [[RecipeAddSoVersionToDLLs|Appending the SO version to DLLs]]
* [[CMake_Build_Rules | Advanced Usage of CMake Build Rules]]
* [[CMake_Checking_Platform | How to Check the Current Platform]]
* [[CMake/Assembler|Assembler Support]]
* [[CMake Generator Specific Information|Docs for Specific Project Generators]] (Eclipse, KDevelop3, CodeBlocks, Makefile)
* [[CMake User Contributed Macros| Contributed macros]]
* [[CMake:Module Maintainers|Module Maintainers]]
* [[CMake Platform Dependent Issues|Platform Dependent Information]]
* [[CMake Released Versions|Documentation for previous releases]]
* [[CMake Life Cycle Considerations]]
* [[CMake Version Compatibility Matrix|Matrix for checking backwards-compatibility of current features]]
* [[CMake builtin documentation handling]]
* [http://www.aosabook.org/en/cmake.html The architecture of Open Source Applications - CMake]
* [https://cmake.org/HTML/Examples.html A Simple CMake Example]
* [http://www.linuxjournal.com/article/6700 Cross-Platform Software Development Using CMake]
* [http://clubjuggler.livejournal.com/138364.html CMake: The Cross Platform Build System]
* [http://www.elpauer.org/stuff/learning_cmake.pdf "Learning CMake"] - Slides of a CMake workshop, including CPack, CTest and CDash
* [https://github.com/TheErk/CMake-tutorial CMake tutorial] - Slides (with LaTeX bearmer source) of a CMake tutorial including CPack, CTest.
* [http://www.visgraf.impa.br/seminar/slides/rodlima_cmake_presentation.pdf "CMake: Behind the Scenes of Code Development"] - Slides of an introductory talk/tutorial about CMake and its benefits
* [http://hackerwithin.org/thw/plugin_wiki/page /buildsystems The Hacker Within: Build Systems] Explains why and how to use build systems with a CMake example.
* How CMake simplifies the build process by Bruno Abinader
** [https:// brunoabinader. com/how-cmake-simplifies-the-build-process-part-1-basic-build-system Part 1 - Basic build system]
** [http://web.archive.org/web/20101030232202/http://cabledogs.org/abinader/2009/12/09/how-cmake-simplifies-the-build-process-part-2-advanced-build-system/ Part 2 - Advanced build system]
* [http://rachid.koucha.free.fr/tech_corner/cmake_manual.html Empirical approach to CMAKE] by Rachid Koucha
* [[CMake/MinimalExamples | Minimal examples]] (wiki page)
===Finding stuff and platform checking===
* [[CMake/Tutorials#CMake_Packages|How to package your project for use by others]], create FooConfig.cmake files, and exporting and importing targets.
* [[CMake:HowToUseExistingOSXFrameworks | How to find and use existing frameworks on OS X]]<br> A quick example to help OS X users find frameworks automatically.
===How to use CMake with specific Libraries ===
* [[CMake:How To Build Qt4 Software | How to build Qt4 software with CMake]]
* [http://qtnode.net/wiki?title=Qt_with_cmake Qt with CMake] <br>Explains how to use CMake to build software with Qt4, Qt3 and KDE3.
* [http://mikemcquaid.com/ 2012/01/deploying-qt-applications-with-deployqt4/ Deploying Qt4 applications with CMake] <br>Explains how to use the DeployQt4.cmake module coming with CMake 2.8.7.
* [[CMake:How To Build KDE4 Software | How to build KDE4 software with CMake]]
* [[CMake/MatlabMex | How to use CMake to create Matlab MEX files]] <br> Describes how to use CMake when developing Matlab Executable (MEX) files for use with The Mathworks Matlab scripting language.
* [http://www.wxwidgets.org/wiki/index.php/CMake How to use CMake for building software with wxWidgets ]
* [http:// www.linuxdevices.com/ articles/AT6762290643.html Building eCos applications with CMake]
* [http://www.smslana.eu Building Sms applications with CMake]
* [http://blog.quickforge.co.uk/2011/10/exploration-of-cross-compiling-on-windows-for-arm-linux-distributions/ Cross compiling from Windows to ARM Linux]
* [[CMakeForFLTK| Using CMake to build an FLTK application]]
* [[CMake:How To Process Lots Of Input Files | How to process lots of input files with a processor built by CMake]]
* [[VSConfigSpecificSettings| Configuration Specific Settings for Visual Studio Generated Project Files]]
* [[BundleUtilitiesExample| How to use the 'BundleUtilities' to deploy your OS X Application. Example uses Qt 4.]]
* [[CMakeForFortranExample|How to write a simple CMakeLists.txt for Fortran code]]
* [[CMakeEmulateMakeCheck|How to emulate GNU Autotools 'make check']]
* [[CustomCommandCustomTargetInstall|A toy model for add_custom_command and add_custom_target]]
* [[CMake:OSX_InterfaceBuilderFiles|Working with OS X Interface Builder Files]]
* [[RecipeAppendVersionNumberToInstallpath|Append the Version Number to the Install path]]
* [[RecipeInstallToALocalFolderForTesting|Install to a local folder in the build dir for testing]]
* [[RecipeAddUninstallTarget|Adding an uninstall target to your project]]
==Converters from other buildsystems to CMake==
All converters listed here are not "complete", i.e. the generated CMake files are not 100% finished, in all cases some work is left for the developer.
* [https://projects.kde.org/projects/kde/kdesdk/kde-dev-scripts/repository/revisions/master/changes/cmake-utils/scripts/am2cmake am2cmake (requires Ruby) ] Converts automake/autotools/libtool based projects to CMake, specialized in converting from KDE 3 to KDE 4, should also work for others. This one has been used for converting the KDE buildsystem to CMake.
* [http://emanuelgreisen.dk/stuff/kdevelop_am2cmake.php.tgz Alternative Automake2CMake (requires PHP)] Converts KDevelop projects that use automake to CMake.
* [[GccXmlAutoConfHints|Converting autoconf tests]]
* [[CMake:ConvertFromQmake | qmake converter (requires Ruby)]] Converts projects that use Qt's qmake.
* [http://vcproj2cmake.sf.net vcproj2cmake.rb (requires Ruby) SourceForge project] Creates '''and maintains''' CMakeLists.txt files by extracting info from Visual Studio project files (.vcproj/.vcxproj). Elaborate script for development side-by-side the updated original static .vc[x]proj files, supports script hooks and powerful definition mappings. Patches and new project members very welcome. Older script versions below:
** [http://www.eskilson.se/vcproj2cmake.rb Original vcproj2cmake.rb version (requires Ruby)]
** Slightly newer version here [http://dgwarp.hd.free.fr/vcproj2cmake.rb vcproj2cmake.rb], see:[[User_talk:Dweeves]] for details
* [http://nberserk.blogspot.com/2010/11/converting-vc-projectsvcproj-to.html vcproj2cmake.ps1(PowerShell version)] Creates CMakeLists.txt. it supports vcproj configuration and detect 'exclude from build' option
* [http://sourceforge.net/projects/folders4cmake/ folders4cmake (requires Java)] Use Visual Studio project files to generate corresponding "source_group" information that you can use inside your own CMake scripts. Supports Visual Studio 9/10 project files (full round-trip possible).
====Basic CMakeLists.txt from-scratch-generator====
* [http://websvn.kde.org/trunk/KDE/kdesdk/cmake/scripts/ gencmake (requires Ruby) ] Creates basic CMakeLists.txt files from looking at the existing files.
* [http://www.vanvelzensoftware.com/postnuke/index.php?name=Downloads&req=viewdownload&cid=7 CMakeListGenerator (Win32) ] Creates complete CMakeLists.txt files as described in the [https://gucef.svn.sourceforge.net/svnroot/gucef/trunk/tools/CMakeListGenerator/docs/README.txt README ] using a combination of file and directory structure analysis. Supports resolving dependencies between multiple archives.
* What are some [[CMake/Projects|projects using CMake]]?
* [[CMake:Articles|Articles about CMake]]
* [[Really Cool CMake Features]]
* [[CMake Fortran Issues|Fortran Issues]]
* [[CMake:For CMake Hackers|Generating dependency graphs with CMake]]
* [[CMake:Experiments With Lua|Experiments With Lua]]
* [[CMake Performance Tips|Performance Tips]]
* [[CMake:GNU style example | GNU style directory layout with CMake]]
* [[CMake:OpenTasks| CMake TODO]]
* [[CMake:CreateQtAssistantDocs| Creating Qt Assistant Docs]]
* [[CMake:Static libraries| Writing FindXXX.cmake modules that work with static libraries]]
* [[CMake:Multiple versions| Writing FindXXX.cmake modules that work when multiple versions of packages are installed]]
* [[CMake/C_Plugins_for_Loadable_Commands]]<br>For anyone who wonders what the <tt>load_command</tt> command is for.
* [[PC-Lint]] support for CMake
* [[CMake/Testing_With_CTest|Testing With CTest]]<br>Introduces to testing with CTest, submitting dashboards, and using CMake to add tests to the test system.
* [[CMake_Scripting_Of_CTest|CTest Scripting]]<br>Describes the scripting with CTest which can significantly simplify and automate testing and submitting dashboards.
* [[CMake_Generating_Testing_Files|Generating Input Files For CTest]]<br>Describe more in details the concepts behind testing with CTest and also explans how to use CTest without using CMake.
* [[CTest:Buildserver|Buildmanagement With CTest]]<br>Describes how to setup a central configuration for all CTest scripts.
* [[CTest:Submission Issues|Configuring CTest Submission Methods]]
* [[CTest:Nightly, Experimental, Continuous|CTest Nightly, Experimental, Continuous, ...]]
* [[Media:CTest Running Modes.pdf]]
* [[CTest:FAQ|CTest Frequently asked questions]]
* [[CTest:OpenTasks| CTest TODO]]
* [[CTest:TestWithoutBuild| Run tests on machines without building first]]
* [http://public.kitware.com/Wiki/CDash CDash Wiki].
* [http://public.kitware.com/Wiki/CDash:FAQ CDash FAQ].
* [[CMake:Packaging With CPack|Packaging with CPack]]<br>Introduction to CPack, installing and packaging of software.
* [https://github.com/TheErk/CMake-tutorial CMake tutorial] - Slides from a CMake tutorial (including LaTeX beamer source) including CPack.
* [[CMake:CPackConfiguration|CPack Variables]]
* [[CMake:CPackPackageGenerators|Supported package formats]]
* [[CMake:CPackWin32NewbiesChecklist|CPack Win32 Newbie Checklist]]
* [[CMake:Component_Install_With_CPack|Component Install With CPack]]
* [[RecipeAddShortcutToStartMenu|Add an application shortcut to the Start Menu]]
=Old(deprecated) kept for reference only=
* [[CMake_2.6_Notes|CMake 2.6 Notes]]
* [[CMake Useful Variables|Useful CMake Variables]]