| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache.plc4x</groupId> |
| <artifactId>plc4cpp-libs</artifactId> |
| <version>0.4.0</version> |
| </parent> |
| |
| <artifactId>plc4cpp-libs-boost</artifactId> |
| <packaging>pom</packaging> |
| |
| <name>PLC4Cpp: Libs: Boost</name> |
| <description>Build the boost library.</description> |
| |
| <properties> |
| <assembly.file>cpp.xml</assembly.file> |
| </properties> |
| |
| <!-- |
| The boost build for windows adds a strange additional directory, |
| so we need to use a special assembly to package this. |
| --> |
| <profiles> |
| <profile> |
| <id>windows</id> |
| <activation> |
| <os> |
| <family>windows</family> |
| </os> |
| </activation> |
| <properties> |
| <assembly.file>cpp-windows.xml</assembly.file> |
| </properties> |
| </profile> |
| </profiles> |
| |
| <!-- |
| Project for building platform dependent versions of the base-libs used by the plc4cpp modules. |
| As building these libraries usually takes quite a lot of time, they are being built in the |
| normal "target" directory, however the finished libs are installed in a "libs" directory. |
| |
| This is done to prevent the libs from being cleaned every time. |
| --> |
| <build> |
| <plugins> |
| <!-- First download the sources for building the boost library --> |
| <plugin> |
| <groupId>com.googlecode.maven-download-plugin</groupId> |
| <artifactId>download-maven-plugin</artifactId> |
| <version>1.4.0</version> |
| <executions> |
| <execution> |
| <id>get-boost</id> |
| <phase>generate-sources</phase> |
| <goals> |
| <goal>wget</goal> |
| </goals> |
| <configuration> |
| <url>${boost.url}</url> |
| <unpack>true</unpack> |
| <outputDirectory>${project.build.directory}</outputDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <!-- |
| Then execute two build phases: |
| |
| 1) bootstrap the build |
| 2) Perform the actual build and install |
| --> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.6.0</version> |
| <executions> |
| <execution> |
| <id>bootstrap</id> |
| <phase>process-sources</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${boost.bootstrap.executable}</executable> |
| <arguments> |
| <argument>gcc</argument> |
| </arguments> |
| <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory> |
| </configuration> |
| </execution> |
| <execution> |
| <id>compile</id> |
| <phase>compile</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| <configuration> |
| <executable>${boost.build.executable}</executable> |
| <arguments> |
| <!-- Have the build install the built libraries --> |
| <argument>install</argument> |
| <!-- Tell it where to install the libraries and header files --> |
| <argument>--prefix=${project.build.directory}/install</argument> |
| <!-- List of modules to build (Currently only the 'system' module --> |
| <argument>--with-system</argument> |
| <!-- On Windows machines the build failed, if this was not explicitly set --> |
| <argument>address-model=64</argument> |
| </arguments> |
| <workingDirectory>${project.build.directory}/boost_${boost.version.underline}</workingDirectory> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <version>3.1.1</version> |
| <executions> |
| <execution> |
| <id>package-cpp</id> |
| <phase>package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| <configuration> |
| <finalName>${project.artifactId}-${project.version}</finalName> |
| <descriptors> |
| <descriptor>src/assembly/${assembly.file}</descriptor> |
| </descriptors> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </project> |