2
0

Build dependencies with a task & all windows archs.

This commit is contained in:
Maarten Billemont 2018-06-25 02:02:51 -04:00
parent 11cf86bc73
commit 8276d2f4e5
3 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -222,7 +222,7 @@ _finalize_merge() {
'windows')
for arch; do
install -d "$prefix/out/lib/$arch"
install -p "$prefix/Win32/"*.lib "$prefix/out/lib/"
install -p "$prefix/$arch/"*.lib "$prefix/out/lib/$arch/"
done
;;
'macos'|'ios')

View File

@ -51,12 +51,23 @@ library {
// Resolve a standard name for the platform.
def platform = standardOperatingSystem( targetPlatform )
if (project.tasks.findByName('buildLibSodium') == null)
archive.dependsOn task( type: Exec, 'buildLibSodium', {
workingDir file( "$rootDir/../lib/bin" )
commandLine 'bash', "./build_libsodium-${platform}"
} )
// if (project.tasks.findByName('buildLibJson-c') == null)
// archive.dependsOn task( type: Exec, 'buildLibJson-c', {
// workingDir file( "$rootDir/../lib/bin" )
// commandLine 'bash', "./build_libjson-c-${platform}"
// } )
project.dependencies {
// Depend on JDK for JNI support.
add( includePathConfiguration.name,
files( new File( Jvm.current().javaHome, "include" ) ) { first().eachDir { from it } } )
// Depend on libsodium from `lib`; run `lib/bin/build_libsodium-${platform}` first.
// Depend on libsodium from `lib`.
add( includePathConfiguration.name,
files( "../../../lib/libsodium/src/libsodium/include" ) )
add( linkLibraries.name,
@ -65,6 +76,7 @@ library {
}
}
static String standardOperatingSystem(NativePlatform platform) {
OperatingSystem os = platform.getOperatingSystem()
if (os.isWindows()) {