<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.bytedeco</groupId>
    <artifactId>javacpp-presets</artifactId>
    <version>1.5</version>
  </parent>

  <groupId>org.bytedeco</groupId>
  <artifactId>mkl-dnn</artifactId>
  <version>${revision}</version>
  <name>JavaCPP Presets for MKL-DNN</name>

  <properties>
    <javacpp.packageName>mkldnn</javacpp.packageName>
    <revision>0.18.1-${project.parent.version}</revision>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.bytedeco</groupId>
      <artifactId>javacpp</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.bytedeco</groupId>
        <artifactId>javacpp</artifactId>
        <executions>
          <execution>
            <id>javacpp-postbuild</id>
            <phase>process-classes</phase>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <skip>${javacpp.compiler.skip}</skip>
              <buildCommand>
                <program>bash</program>
                <argument>${project.basedir}/postbuild.sh</argument>
              </buildCommand>
              <workingDirectory>${project.basedir}</workingDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>javacpp-${javacpp.platform}</id>
            <phase>package</phase>
            <configuration>
              <excludes>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/*.exp</exclude>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/*.lib</exclude>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/*.obj</exclude>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/bin/*</exclude>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/lib/*.dll</exclude>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/lib/*.dylib</exclude>
                <exclude>org/bytedeco/mkldnn/${javacpp.platform}/lib/*.so*</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.moditect</groupId>
        <artifactId>moditect-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>macosx-gcc8</id>
      <activation>
        <file>
          <exists>/usr/local/bin/g++-8</exists>
        </file>
      </activation>
      <properties>
        <javacpp.platform.compiler>/usr/local/bin/g++-8</javacpp.platform.compiler>
      </properties>
    </profile>
    <profile>
      <id>macosx-gcc7</id>
      <activation>
        <file>
          <exists>/usr/local/bin/g++-7</exists>
        </file>
      </activation>
      <properties>
        <javacpp.platform.compiler>/usr/local/bin/g++-7</javacpp.platform.compiler>
      </properties>
    </profile>
    <profile>
      <id>macosx-gcc6</id>
      <activation>
        <file>
          <exists>/usr/local/bin/g++-6</exists>
        </file>
      </activation>
      <properties>
         <javacpp.platform.compiler>/usr/local/bin/g++-6</javacpp.platform.compiler>
      </properties>
    </profile>
    <profile>
      <id>macosx-gcc5</id>
      <activation>
        <file>
          <exists>/usr/local/bin/g++-5</exists>
        </file>
      </activation>
      <properties>
        <javacpp.platform.compiler>/usr/local/bin/g++-5</javacpp.platform.compiler>
      </properties>
    </profile>
    <profile>
      <id>mingw</id>
      <activation>
        <os><family>windows</family></os>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.bytedeco</groupId>
            <artifactId>javacpp</artifactId>
            <configuration>
              <properties>${javacpp.platform}-mingw</properties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
