diff --git a/performance/helloworld/build.gradle b/performance/helloworld/build.gradle index 06a3f7c0801..2e6428242fc 100644 --- a/performance/helloworld/build.gradle +++ b/performance/helloworld/build.gradle @@ -1,9 +1,10 @@ def dist = findProperty('org.jetbrains.kotlin.native.home') ?: 'dist' +dist = (new File(dist)).isAbsolute() ? dist : "${project.getProjectDir()}/$dist" def toolExtension = System.getProperty("os.name").startsWith('Windows') ? ".bat" : "" project.ext { applicationName = 'HelloWorld' repeatNumber = 10 - buildSteps = ["runKonanc": ["${project.getProjectDir()}/$dist/bin/konanc$toolExtension", "${project.getProjectDir()}/src/main/kotlin/main.kt", "-o", + buildSteps = ["runKonanc": ["$dist/bin/konanc$toolExtension", "${project.getProjectDir()}/src/main/kotlin/main.kt", "-o", "${buildDir.absolutePath}/program${MPPTools.getNativeProgramExtension()}"]] } apply from: rootProject.file("${rootProject.rootDir}/gradle/compileBenchmark.gradle") \ No newline at end of file diff --git a/performance/videoplayer/build.gradle b/performance/videoplayer/build.gradle index aec77583c13..96ddd6d5f37 100644 --- a/performance/videoplayer/build.gradle +++ b/performance/videoplayer/build.gradle @@ -1,4 +1,5 @@ def dist = findProperty('org.jetbrains.kotlin.native.home') ?: 'dist' +dist = (new File(dist)).isAbsolute() ? dist : "${project.getProjectDir()}/$dist" def toolExtension = System.getProperty("os.name").startsWith('Windows') ? ".bat" : "" def linkerOpts = [] @@ -36,14 +37,14 @@ if (MPPTools.isMacos()) { project.ext { applicationName = 'Videoplayer' repeatNumber = 10 - buildSteps = ["runCinteropFfmpeg": ["${project.getProjectDir()}/$dist/bin/cinterop$toolExtension", "-o", "${project.getProjectDir()}/$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib", - "-def", "${project.getProjectDir()}/$dist/../samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def"] + filterDirsFfmpeg + includeDirsFfmpeg, - "runCinteropSdl": ["${project.getProjectDir()}/$dist/bin/cinterop$toolExtension", "-o", "${project.getProjectDir()}/$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib", - "-def", "${project.getProjectDir()}/$dist/../samples/videoplayer/src/nativeInterop/cinterop/sdl.def"] + includeDirsSdl, - "runKonanProgram": ["${project.getProjectDir()}/$dist/bin/konanc$toolExtension", "-ea", "-p", "program", "-o", "${buildDir.absolutePath}/program${MPPTools.getNativeProgramExtension()}", - "-l", "${project.getProjectDir()}/$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib", - "-l", "${project.getProjectDir()}/$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib", - "-Xmulti-platform", "${project.getProjectDir()}/$dist/../samples/videoplayer/src/videoPlayerMain/kotlin", + buildSteps = ["runCinteropFfmpeg": ["$dist/bin/cinterop$toolExtension", "-o", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib", + "-def", "$dist/../samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def"] + filterDirsFfmpeg + includeDirsFfmpeg, + "runCinteropSdl": ["$dist/bin/cinterop$toolExtension", "-o", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib", + "-def", "$dist/../samples/videoplayer/src/nativeInterop/cinterop/sdl.def"] + includeDirsSdl, + "runKonanProgram": ["$dist/bin/konanc$toolExtension", "-ea", "-p", "program", "-o", "${buildDir.absolutePath}/program${MPPTools.getNativeProgramExtension()}", + "-l", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib", + "-l", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib", + "-Xmulti-platform", "$dist/../samples/videoplayer/src/videoPlayerMain/kotlin", "-entry", "sample.videoplayer.main"] + linkerOpts] } apply from: rootProject.file("${rootProject.rootDir}/gradle/compileBenchmark.gradle") \ No newline at end of file