NASAWorldWind / WorldWindJava

The NASA WorldWind Java SDK (WWJ) is for building cross-platform 3D geospatial desktop applications in Java.
712 stars 324 forks source link

GDAL Built for Apple ARM #243

Open Bio7 opened 2 years ago

Bio7 commented 2 years ago

I have a question regarding the built of GDAL with WorldWind.

Since there is no built shipped with WorldWind I compiled GDAL 3.4.2 with Java from the sources which took me a while to figure out all dependencies and linker options.

I left out the MrSID dependency since there is no built available at the moment for ARM.

However I try to understand how GDAL for WorldWind was configured to create a single dynamic library as described in the repository:

To simplify deployment, our GDAL+PRO4+MRSID bundles are compiled as a single dynamic library that has all dependent libraries statically compiled.

So any hints how you configured GDAL to create one .dylib for WorldWind would be a help.

At the moment I configure GDAL like this:

CPPFLAGS=-I/usr/local/lib/include LDFLAGS=-L/Usr/local/lib ./configure --with-java --with-jvm-lib=/Applications/Eclipse.app/Contents/MacOS/jdk/Contents/Home --with-threads --without-grass --with-jasper --with-libtiff --with-jpeg= --with-gif --with-png --with-geotiff --with-pcraster=internal --with-geos --with-proj --with-expat --with-curl --with-netcdf --with-hdf5

Then I execute make (or for a static lib: make static-lib)

After that I change to the swig/java directory and create the java *.jar (My JDK is bundled within the Eclipse.app)

make CFLAGS="-I/Applications/Eclipse.app/Contents/MacOS/jdk/Contents/Home/include -I/Applications/Eclipse.app/Contents/MacOS/jdk/Contents/Home/include/darwin"