Skip to content

Commit

Permalink
* Add support for Windows to presets for LiquidFun (pull #536)
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon authored and saudet committed Oct 1, 2018
1 parent 5d53765 commit b3524ea
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .appveyor.yml
Expand Up @@ -49,6 +49,8 @@ environment:
OS: windows-x86
- PROJ: "ale"
OS: windows-x86
- PROJ: "liquidfun"
OS: windows-x86
- PROJ: "systems"
OS: windows-x86

Expand Down Expand Up @@ -106,6 +108,8 @@ environment:
OS: windows-x86_64
- PROJ: "ale"
OS: windows-x86_64
- PROJ: "liquidfun"
OS: windows-x86_64
- PROJ: "systems"
OS: windows-x86_64

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,4 +1,5 @@

* Add support for Windows to presets for LiquidFun ([pull #536](https://github.com/bytedeco/javacpp-presets/pull/536))
* Add CUDA-enabled build for MXNet via `-gpu` extension ([pull #609](https://github.com/bytedeco/javacpp-presets/pull/609))
* Prevent MKL-DNN from compiling code with `-march=native` ([pull #618](https://github.com/bytedeco/javacpp-presets/pull/618))
* Add an RPATH to `libmkldnn.so.0` to avoid loading issues on Linux ([issue deeplearning4j/deeplearning4j#6366](https://github.com/deeplearning4j/deeplearning4j/issues/6366))
Expand Down
20 changes: 18 additions & 2 deletions liquidfun/cppbuild.sh
Expand Up @@ -21,16 +21,32 @@ cd liquidfun-$LIQUIDFUN_VERSION
case $PLATFORM in
linux-x86)
cd liquidfun/Box2D
CC="$OLDCC -m32" CXX="$OLDCXX -m32" $CMAKE -DBOX2D_INSTALL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOX2D_BUILD_SHARED=ON -DBOX2D_BUILD_EXAMPLES=OFF -DBOX2D_BUILD_UNITTESTS=OFF
CC="gcc -m32" CXX="g++ -m32" $CMAKE -DBOX2D_INSTALL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOX2D_BUILD_SHARED=ON -DBOX2D_BUILD_EXAMPLES=OFF -DBOX2D_BUILD_UNITTESTS=OFF
make -j $MAKEJ
make install/strip
;;
linux-x86_64)
cd liquidfun/Box2D
CC="$OLDCC -m64" CXX="$OLDCXX -m64" $CMAKE -DBOX2D_INSTALL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOX2D_BUILD_SHARED=ON -DBOX2D_BUILD_EXAMPLES=OFF -DBOX2D_BUILD_UNITTESTS=OFF
CC="gcc -m64" CXX="g++ -m64" $CMAKE -DBOX2D_INSTALL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOX2D_BUILD_SHARED=ON -DBOX2D_BUILD_EXAMPLES=OFF -DBOX2D_BUILD_UNITTESTS=OFF
make -j $MAKEJ
make install/strip
;;
windows-x86)
cd liquidfun/Box2D
CXXFLAGS="/Wv:17" $CMAKE -G "Visual Studio 14 2015" -DBOX2D_INSTALL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOX2D_BUILD_SHARED=ON -DBOX2D_BUILD_EXAMPLES=OFF -DBOX2D_BUILD_UNITTESTS=OFF
MSBuild.exe Box2D.sln //p:Configuration=Release //maxcpucount:$MAKEJ
cp -r Box2D $INSTALL_PATH/include
cp Box2D/Release/*.lib $INSTALL_PATH/lib
cp Box2D/Release/*.dll $INSTALL_PATH/bin
;;
windows-x86_64)
cd liquidfun/Box2D
CXXFLAGS="/Wv:17" $CMAKE -G "Visual Studio 14 2015 Win64" -DBOX2D_INSTALL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH -DBOX2D_BUILD_SHARED=ON -DBOX2D_BUILD_EXAMPLES=OFF -DBOX2D_BUILD_UNITTESTS=OFF
MSBuild.exe Box2D.sln //p:Configuration=Release //maxcpucount:$MAKEJ
cp -r Box2D $INSTALL_PATH/include
cp Box2D/Release/*.lib $INSTALL_PATH/lib
cp Box2D/Release/*.dll $INSTALL_PATH/bin
;;
macosx-*)
patch -Np1 <$INSTALL_PATH/../../liquidfun-macosx.patch
cd liquidfun/Box2D
Expand Down
14 changes: 13 additions & 1 deletion liquidfun/platform/pom.xml
Expand Up @@ -43,6 +43,18 @@
<version>${project.version}</version>
<classifier>${javacpp.platform.macosx-x86_64}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.windows-x86}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.windows-x86_64}</classifier>
</dependency>
</dependencies>

<build>
Expand All @@ -55,7 +67,7 @@
<configuration>
<archive>
<manifestEntries>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-x86_64.jar</Class-Path>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Expand Down
16 changes: 0 additions & 16 deletions liquidfun/pom.xml
Expand Up @@ -15,10 +15,6 @@
<packaging>jar</packaging>
<name>JavaCPP Presets for LiquidFun</name>

<properties>
<javacpp.platform.oldcompiler>${javacpp.platform.compiler}</javacpp.platform.oldcompiler>
</properties>

<dependencies>
<dependency>
<groupId>org.bytedeco</groupId>
Expand All @@ -37,18 +33,6 @@
<plugin>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<configuration>
<propertyKeysAndValues>
<property>
<name>platform.root</name>
<value>${javacpp.platform.root}</value>
</property>
<property>
<name>platform.compiler</name>
<value>${javacpp.platform.oldcompiler}</value>
</property>
</propertyKeysAndValues>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
@@ -1,4 +1,4 @@
// Targeted by JavaCPP version 1.4.2: DO NOT EDIT THIS FILE
// Targeted by JavaCPP version 1.4.3-SNAPSHOT: DO NOT EDIT THIS FILE

package org.bytedeco.javacpp;

Expand Down
Expand Up @@ -33,7 +33,7 @@
*/

@Properties(target = "org.bytedeco.javacpp.liquidfun", value = {
@Platform(value = {"linux-x86", "macosx"},
@Platform(value = {"linux-x86", "macosx", "windows-x86"},
define = "LIQUIDFUN_EXTERNAL_LANGUAGE_API 1",
include = {"<Box2D/Common/b2Settings.h>",
"<Box2D/Common/b2Math.h>",
Expand Down
2 changes: 2 additions & 0 deletions pom.xml
Expand Up @@ -1287,6 +1287,7 @@
<module>leptonica</module>
<module>tesseract</module>
<module>ale</module>
<module>liquidfun</module>
<module>systems</module>
</modules>
<properties>
Expand Down Expand Up @@ -1346,6 +1347,7 @@
<module>cuda</module>
<module>tensorflow</module>
<module>ale</module>
<module>liquidfun</module>
<module>systems</module>
</modules>
<properties>
Expand Down

0 comments on commit b3524ea

Please sign in to comment.