diff --git a/samples/opengl/build.gradle b/samples/opengl/build.gradle index 1a9a21179bd..6243debfc89 100644 --- a/samples/opengl/build.gradle +++ b/samples/opengl/build.gradle @@ -1,18 +1,7 @@ apply plugin: 'konan' -konanInterop { - opengl { } -} - - konanArtifacts { - OpenGlTeapotMacbook { - useInterop 'opengl' + OpenGlTeapot { target "macbook" } - - OpenGlTeapotLinux { - useInterop 'opengl' - target "linux" - } } diff --git a/samples/opengl/build.sh b/samples/opengl/build.sh index f15dedb0688..7137928c286 100755 --- a/samples/opengl/build.sh +++ b/samples/opengl/build.sh @@ -6,23 +6,13 @@ PATH=$DIR/../../dist/bin:$DIR/../../bin:$PATH if [ x$TARGET == x ]; then case "$OSTYPE" in darwin*) TARGET=macbook ;; - linux*) TARGET=linux ;; *) echo "unknown: $OSTYPE" && exit 1;; esac fi -var=CFLAGS_${TARGET} -CFLAGS=${!var} -var=COMPILER_ARGS_${TARGET} -COMPILER_ARGS=${!var} # add -opt for an optimized build. - -mkdir -p $DIR/build/c_interop/ mkdir -p $DIR/build/bin/ -cinterop -def $DIR/src/main/c_interop/opengl.def -target $TARGET \ - -o $DIR/build/c_interop/opengl || exit 1 - -konanc -target $TARGET $DIR/src/main/kotlin/OpenGlTeapot.kt -library $DIR/build/c_interop/opengl \ +konanc -target $TARGET $DIR/src/main/kotlin/OpenGlTeapot.kt \ -o $DIR/build/bin/OpenGlTeapot || exit 1 echo "Artifact path is $DIR/build/bin/OpenGlTeapot.kexe" diff --git a/samples/opengl/src/main/c_interop/opengl.def b/samples/opengl/src/main/c_interop/opengl.def deleted file mode 100644 index 71f4ec05a86..00000000000 --- a/samples/opengl/src/main/c_interop/opengl.def +++ /dev/null @@ -1,7 +0,0 @@ -headers.osx = OpenGL/gl.h OpenGL/glu.h GLUT/glut.h -headers.linux = GL/glut.h -compilerOpts.osx = -framework OpenGL -framework GLUT -compilerOpts.linux = -I/usr/include -excludeDependentModules.osx = true -linkerOpts.osx = -framework OpenGL -framework GLUT -linkerOpts.linux = -L/usr/lib/x86_64-linux-gnu -lglut -lGL -lGLU diff --git a/samples/opengl/src/main/kotlin/OpenGlTeapot.kt b/samples/opengl/src/main/kotlin/OpenGlTeapot.kt index 687b066a861..a152e3bcb25 100644 --- a/samples/opengl/src/main/kotlin/OpenGlTeapot.kt +++ b/samples/opengl/src/main/kotlin/OpenGlTeapot.kt @@ -15,7 +15,9 @@ */ import kotlinx.cinterop.* -import opengl.* +import platform.GLUT.* +import platform.OpenGL.* +import platform.OpenGLCommon.* // Ported from http://openglsamples.sourceforge.net/projects/index.php/blog/index/