Fix native-build/target/lib wanted but build in native-build/target/lib64 (#9410)

Motivation:

On openSUSE (probably more), 64 bit builds use lib64, e.g. /usr/lib64, and
configure picks this up and builds the native library in
native-build/target/lib64 where maven is not looking.

Modifications:

Explicitly specify --libdir=${project.build.directory}/native-build/target/lib
during configuration.

Result:

Maven uses the correct lib directory.
This commit is contained in:
Nico Kruber 2019-08-07 09:56:28 +02:00 committed by Norman Maurer
parent c1c43af060
commit 68e49af483
2 changed files with 2 additions and 0 deletions

View File

@ -155,6 +155,7 @@
<configureArgs> <configureArgs>
<arg>${jni.compiler.args.ldflags}</arg> <arg>${jni.compiler.args.ldflags}</arg>
<arg>${jni.compiler.args.cflags}</arg> <arg>${jni.compiler.args.cflags}</arg>
<configureArg>--libdir=${project.build.directory}/native-build/target/lib</configureArg>
</configureArgs> </configureArgs>
</configuration> </configuration>
<goals> <goals>

View File

@ -84,6 +84,7 @@
explicitly set the target platform. Otherwise we may get fatal link errors due to weakly linked explicitly set the target platform. Otherwise we may get fatal link errors due to weakly linked
methods which are not expected to be present on MacOS (e.g. accept4). --> methods which are not expected to be present on MacOS (e.g. accept4). -->
<arg>MACOSX_DEPLOYMENT_TARGET=10.6</arg> <arg>MACOSX_DEPLOYMENT_TARGET=10.6</arg>
<configureArg>--libdir=${project.build.directory}/native-build/target/lib</configureArg>
</configureArgs> </configureArgs>
</configuration> </configuration>
<goals> <goals>