Reputation: 400
I have been trying for a while to figure out how to build the ARWrapper library that is used by Unity to interface to ARToolkit 5.3.1. I can build the ARWrapper bundle using the ARToolkit source but I have no idea how to move from the bundle to the platform specific libraries (iOS and Android). In ARToolkit package for Unity there are the following assets provided which I need to build:
Android: AndroidManifest.xml, AndroidManifest.xml.meta, BT200Ctrl.jar, BT200Ctrl.jar.meta, libARWrapper.so, libARWrapper.so.meta, libc++_shared.so, libc++_shared.so.meta, res: res.meta, UnityARPlayer.jar, UnityARPlayer.jar.meta
iOS: ARToolKitUtilities.m, ARToolKitUtilities.m.meta, libARWrapper.a, libARWrapper.a.meta, libjpeg.a, libjpeg.a.meta
But so far using ARToolkit source code I could only build one bundle file (ARWrapper.bundle).
Could someone please help me understand how to move from the bundle to platform specific libraries as shown above in the asset folder of the package. More specifically I want to be able to build libARWrapper.so and libARWrapper.a
Upvotes: 1
Views: 1236
Reputation: 5499
libARWrapper is part of ARToolKit for each platform.
cd android
and then ./build.sh
. Finally, copy the libARWrapper.so from the libs directory into your Unity project.The other portions you mentioned can generally be rebuilt on each platform. For Android, the other key component you might want to rebuild is UnityARWrapper.jar, the source for which is included in the ARToolKit for Unity SDK.
Upvotes: 2
Reputation: 3456
If you have the good toolchain I guess you should use CMake http://www.vtk.org/Wiki/CMake_Cross_Compiling
Basically the idea is to get the source code, create a build directory and then:
cd build
~/src/build$ cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain.cmake ..
Upvotes: 0