Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cmake-maven-project/cmake-maven-project
Project to enable using CMake from a Maven build.
https://github.com/cmake-maven-project/cmake-maven-project
cmake maven
Last synced: about 2 months ago
JSON representation
Project to enable using CMake from a Maven build.
- Host: GitHub
- URL: https://github.com/cmake-maven-project/cmake-maven-project
- Owner: cmake-maven-project
- Created: 2015-10-28T00:54:59.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T00:35:07.000Z (4 months ago)
- Last Synced: 2024-05-01T17:22:42.407Z (about 2 months ago)
- Topics: cmake, maven
- Language: Java
- Homepage:
- Size: 471 KB
- Stars: 68
- Watchers: 11
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Lists
- awesome-cmake - cmake-maven-plugin - CMake integration for Maven builds. [```[APACHE2]```][APACHE2] (Other)
README
# CMake-Maven-Project [![build-status](../../workflows/Build/badge.svg)](../../actions?query=workflow%3ABuild)
## 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](https://code.google.com/p/cmake-maven-project/) on Google Code and was
migrated to GitHub (and Git) after Google Code shut down.## Sample Usage
### Generate Goal
```xml
com.googlecode.cmake-maven-project
cmake-maven-plugin
3.27.7-b1
cmake-generate
generate
value
-DBUILD_THIRDPARTY:bool=on
```
### Compile Goal
```xml
com.googlecode.cmake-maven-project
cmake-maven-plugin
3.27.7-b1
cmake-compile
compile
value
```
### Test Goal
```xml
com.googlecode.cmake-maven-project
cmake-maven-plugin
3.27.7-b1
cmake-test
test
${project.build.directory}
true
true
true
2
Experimental
```
### Examples
The following projects contain examples of how to use this plugin:
[Requirements API](https://github.com/cowwoc/requirements.java/blob/ed0fb648947284ddb1a28959bf8003c0807e3bef/natives/pom.xml#L69)
### 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
* windows-arm_64
* linux-x86_64
* linux-arm_32
* mac-x86_64
* mac-arm_64If 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.1. Set `${cmake.download}` to `false`.
2. 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](https://cmake.org/) website.
### License
CMake-Maven-Project is released under an [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)