Skip to content

Commit

Permalink
Improved support for native library deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jcuda committed Aug 29, 2016
1 parent af3572d commit dc81548
Show file tree
Hide file tree
Showing 8 changed files with 399 additions and 219 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
JCudaJava/target/
/JCudaJava/target/
/JCudaJava/.settings
/JCudaJava/.classpath
/JCudaJava/.project
/target
/nativeLibraries
2 changes: 1 addition & 1 deletion JCudaDriverJNI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ target_link_libraries(${PROJECT_NAME}
)

set_target_properties(${PROJECT_NAME}
PROPERTIES OUTPUT_NAME ${PROJECT_NAME}-${CMAKE_HOST}-${CMAKE_ARCH})
PROPERTIES OUTPUT_NAME ${PROJECT_NAME}-${JCUDA_VERSION}-${JCUDA_OS}-${JCUDA_ARCH})
97 changes: 3 additions & 94 deletions JCudaJava/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
<parent>
<groupId>org.jcuda</groupId>
<artifactId>jcuda-parent</artifactId>
<version>0.7.5b</version>
<version>0.7.5c</version>
<relativePath>../../jcuda-common/JCudaParentPOM/pom.xml</relativePath>
</parent>

<artifactId>jcuda</artifactId>

<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -21,103 +22,11 @@

<dependency>
<groupId>org.jcuda</groupId>
<artifactId>JCudaRuntime-native</artifactId>
<version>${project.version}</version>
<classifier>${jcuda.os}-${jcuda.arch}</classifier>
<type>${jcuda.ext}</type>
</dependency>

<dependency>
<groupId>org.jcuda</groupId>
<artifactId>JCudaDriver-native</artifactId>
<artifactId>jcuda-natives</artifactId>
<version>${project.version}</version>
<classifier>${jcuda.os}-${jcuda.arch}</classifier>
<type>${jcuda.ext}</type>
</dependency>

</dependencies>


<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>

<execution>
<phase>process-test-resources</phase>
<id>copy-natives</id>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jcuda</groupId>
<artifactId>JCudaRuntime-native</artifactId>
<classifier>${jcuda.os}-${jcuda.arch}</classifier>
<type>${jcuda.ext}</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>${jcuda.prefix}JCudaRuntime-${jcuda.os}-${jcuda.arch}.${jcuda.ext}</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.jcuda</groupId>
<artifactId>JCudaDriver-native</artifactId>
<classifier>${jcuda.os}-${jcuda.arch}</classifier>
<type>${jcuda.ext}</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<destFileName>${jcuda.prefix}JCudaDriver-${jcuda.os}-${jcuda.arch}.${jcuda.ext}</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>

</executions>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-dependency-plugin
</artifactId>
<versionRange>
[2.10,)
</versionRange>
<goals>
<goal>
copy-dependencies
</goal>
<goal>copy</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Loading

0 comments on commit dc81548

Please sign in to comment.