]> source.dussan.org Git - dcevm.git/commitdiff
Fixing native code compilation
authorIvan Dubrov <idubrov@guidewire.com>
Fri, 25 Apr 2014 23:08:45 +0000 (16:08 -0700)
committerIvan Dubrov <idubrov@guidewire.com>
Fri, 25 Apr 2014 23:16:42 +0000 (16:16 -0700)
build.gradle
native/compile.cmd

index 626927470400ab8c23833a0f3fd7030596c476d4..dae673eaf0bff95947bf0cdb55048411ca5131da 100644 (file)
@@ -128,8 +128,12 @@ project('agent') {
 }
 
 project('native') {
+    apply plugin: 'base'
     task compile(type: Exec) {
-        if (root.os != Os.WINDOWS) {
+        doFirst {
+            buildDir.mkdirs()
+        }
+        if (os != Os.WINDOWS) {
             commandLine 'gcc'
             args "-I${jre}/../include"
             args "-I${jre}/../include/linux"
@@ -138,8 +142,8 @@ project('native') {
             args '-o'
             args 'build/libnatives.so'
         } else {
-            commandLine 'compile.cmd'
-            environment ARCH: root.arch == Arch.X86 ? 'x86' : 'x64'
+            commandLine 'cmd', '/c', 'compile.cmd'
+            environment ARCH: arch == Arch.X86 ? 'x86' : 'x64'
             environment JAVA_HOME: jre
         }
     }
index c1c4f9a876ed2f293b780702fec85b7d488b0b36..dde609a52277d698b49314298620e53b8f48a8fb 100644 (file)
@@ -1,4 +1,4 @@
 set WINDOWS_SDK=c:\Program Files\Microsoft SDKs\Windows\v7.1
 call "%WINDOWS_SDK%\bin\setenv.cmd" /%ARCH%
 
-%VC%\bin\cl /I%JAVA_HOME%\include /I%JAVA_HOME%\include\win32 natives.c /Fenatives.dll /LD
+cl /I%JAVA_HOME%\..\include /I%JAVA_HOME%\..\include\win32 natives.c /Febuild\natives.dll /LD