Introduction
A Maven project for the CMake build system. It can be used by including it as a plugin within your Maven project's pom.xml file.
This repository originally lived on Google Code and was migrated to GitHub (and Git) after Google Code shut down.
Sample Usage
Generate Goal
com.googlecode.cmake-maven-project
cmake-maven-plugin
3.19.2-b1
cmake-generate
generate
value
Compile Goal
com.googlecode.cmake-maven-project
cmake-maven-plugin
3.19.2-b1
cmake-compile
compile
value
Test Goal
com.googlecode.cmake-maven-project
cmake-maven-plugin
3.19.2-b1
cmake-test
test
${project.build.directory}
true
true
true
2
Experimental
Examples
The following projects contain examples of how to use this plugin:
Building instructions
To build the plugin, run:
mvn install
To clean an old build, run:
mvn clean
By default, Maven will activate the right profile based on your JVM:
- windows-x86_64
- linux-x86_64
- linux-arm_32
- mac-x86_64
If detection does not work, or you wish to override it then set -P
.
For instance, when building for 64-bit Linux machines, use:
mvn -Plinux-x86_64 install
Using a local CMake installation
Sometimes it is preferable or necessary to use a preexisting CMake installation. cmake.org doesn't provide binaries for some platforms, such as Raspberry Pi. In such cases, users can install the binaries themselves (typically using package managers like apt-get
) and point the plugin at them.
- Set
${cmake.download}
tofalse
. - Optionally set
${cmake.dir}
to the directory containing the binaries (e.g./usr/bin
). Otherwise, the plugin will expect the binaries to be on the PATH.
That's it! To learn more about CMake itself, consult the CMake.org website.
License
CMake-Maven-Project is released under an Apache License 2.0