Skip to content

Commit

Permalink
Merge pull request zeromq#119 from rimmington/master
Browse files Browse the repository at this point in the history
make native library search ignore Windows version
  • Loading branch information
gonzus committed Jul 27, 2012
2 parents a018a4a + d058b47 commit 7c02a59
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
18 changes: 17 additions & 1 deletion pom.xml
Expand Up @@ -45,8 +45,24 @@
<maven-source-plugin.version>2.1.2</maven-source-plugin.version>

<junit.version>4.8.2</junit.version>

<native.os>${os.name}</native.os>
</properties>

<profiles>
<profile>
<id>Windows</id>
<activation>
<os>
<family>windows</family>
</os>
</activation>
<properties>
<native.os>Windows</native.os>
</properties>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>junit</groupId>
Expand All @@ -63,7 +79,7 @@
<resources>
<resource>
<filtering>false</filtering>
<targetPath>NATIVE/${os.arch}/${os.name}</targetPath>
<targetPath>NATIVE/${os.arch}/${native.os}</targetPath>
<directory>${basedir}/src/.libs</directory>
<includes>
<include>libjzmq.so</include>
Expand Down
7 changes: 6 additions & 1 deletion src/org/zeromq/EmbeddedLibraryTools.java
Expand Up @@ -23,7 +23,12 @@ public class EmbeddedLibraryTools {
}

public static String getCurrentPlatformIdentifier() {
return System.getProperty("os.arch") + "/" + System.getProperty("os.name");
String osName = System.getProperty("os.name");
if (osName.toLowerCase().indexOf("windows") > -1) {
osName = "Windows";
}

return System.getProperty("os.arch") + "/" + osName;
}

public static Collection<String> getEmbeddedLibraryList() {
Expand Down

0 comments on commit 7c02a59

Please sign in to comment.