diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/klibtest.xml b/.idea/runConfigurations/klibtest.xml
new file mode 100644
index 0000000..731ea09
--- /dev/null
+++ b/.idea/runConfigurations/klibtest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/klibtest.xml b/.idea/runConfigurations/klibtest.xml
new file mode 100644
index 0000000..731ea09
--- /dev/null
+++ b/.idea/runConfigurations/klibtest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/klibtest.xml b/.idea/runConfigurations/klibtest.xml
new file mode 100644
index 0000000..731ea09
--- /dev/null
+++ b/.idea/runConfigurations/klibtest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..a450e76
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.8)
+
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/KotlinCMakeModule)
+
+project(create_klib_test Kotlin)
+
+konanc_library(
+ NAME klibtest
+ SOURCES src
+)
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/klibtest.xml b/.idea/runConfigurations/klibtest.xml
new file mode 100644
index 0000000..731ea09
--- /dev/null
+++ b/.idea/runConfigurations/klibtest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..a450e76
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.8)
+
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/KotlinCMakeModule)
+
+project(create_klib_test Kotlin)
+
+konanc_library(
+ NAME klibtest
+ SOURCES src
+)
diff --git a/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake b/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake
new file mode 100644
index 0000000..0320d7f
--- /dev/null
+++ b/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake
@@ -0,0 +1,38 @@
+if (NOT CMAKE_Kotlin_COMPILER)
+ #TODO determine Kotlin compiler in not hardcoded way
+ set(Kotlin_BIN_PATH
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3/bin
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3.1/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3.1/bin
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3.2/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3.2/bin
+ )
+
+
+ if (CMAKE_Kotlin_COMPILER_INIT)
+ set(CMAKE_Kotlin_COMPILER ${CMAKE_Kotlin_COMPILER_INIT} CACHE PATH "Kotlin Compiler")
+ else ()
+ find_program(CMAKE_Kotlin_COMPILER
+ NAMES konanc
+ PATHS ${Kotlin_BIN_PATH}
+ )
+ endif ()
+
+
+ if (CMAKE_Kotlin_CINTEROP_INIT)
+ set(CMAKE_Kotlin_CINTEROP ${CMAKE_Kotlin_CINTEROP_INIT} CACHE PATH "Kotlin Cinterop")
+ else ()
+ find_program(CMAKE_Kotlin_CINTEROP
+ NAMES cinterop
+ PATHS ${Kotlin_BIN_PATH}
+ )
+ endif ()
+endif ()
+
+mark_as_advanced(CMAKE_Kotlin_COMPILER)
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeKotlinCompiler.cmake.in
+ ${CMAKE_PLATFORM_INFO_DIR}/CMakeKotlinCompiler.cmake @ONLY)
+
+set(CMAKE_Kotlin_COMPILER_ENV_VAR "KOTLIN_COMPILER")
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/klibtest.xml b/.idea/runConfigurations/klibtest.xml
new file mode 100644
index 0000000..731ea09
--- /dev/null
+++ b/.idea/runConfigurations/klibtest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..a450e76
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.8)
+
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/KotlinCMakeModule)
+
+project(create_klib_test Kotlin)
+
+konanc_library(
+ NAME klibtest
+ SOURCES src
+)
diff --git a/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake b/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake
new file mode 100644
index 0000000..0320d7f
--- /dev/null
+++ b/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake
@@ -0,0 +1,38 @@
+if (NOT CMAKE_Kotlin_COMPILER)
+ #TODO determine Kotlin compiler in not hardcoded way
+ set(Kotlin_BIN_PATH
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3/bin
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3.1/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3.1/bin
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3.2/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3.2/bin
+ )
+
+
+ if (CMAKE_Kotlin_COMPILER_INIT)
+ set(CMAKE_Kotlin_COMPILER ${CMAKE_Kotlin_COMPILER_INIT} CACHE PATH "Kotlin Compiler")
+ else ()
+ find_program(CMAKE_Kotlin_COMPILER
+ NAMES konanc
+ PATHS ${Kotlin_BIN_PATH}
+ )
+ endif ()
+
+
+ if (CMAKE_Kotlin_CINTEROP_INIT)
+ set(CMAKE_Kotlin_CINTEROP ${CMAKE_Kotlin_CINTEROP_INIT} CACHE PATH "Kotlin Cinterop")
+ else ()
+ find_program(CMAKE_Kotlin_CINTEROP
+ NAMES cinterop
+ PATHS ${Kotlin_BIN_PATH}
+ )
+ endif ()
+endif ()
+
+mark_as_advanced(CMAKE_Kotlin_COMPILER)
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeKotlinCompiler.cmake.in
+ ${CMAKE_PLATFORM_INFO_DIR}/CMakeKotlinCompiler.cmake @ONLY)
+
+set(CMAKE_Kotlin_COMPILER_ENV_VAR "KOTLIN_COMPILER")
\ No newline at end of file
diff --git a/KotlinCMakeModule/CMakeKotlinCompiler.cmake.in b/KotlinCMakeModule/CMakeKotlinCompiler.cmake.in
new file mode 100644
index 0000000..4a69230
--- /dev/null
+++ b/KotlinCMakeModule/CMakeKotlinCompiler.cmake.in
@@ -0,0 +1,5 @@
+set(CMAKE_Kotlin_COMPILER "@CMAKE_Kotlin_COMPILER@")
+set(CMAKE_Kotlin_COMPILER_LOADED 1)
+
+set(CMAKE_Kotlin_SOURCE_FILE_EXTENSIONS kt;def)
+set(CMAKE_Kotlin_COMPILER_ENV_VAR "KOTLIN_COMPILER")
\ No newline at end of file
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..937814a
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+create_klib_test
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/create-klib-test.iml b/.idea/create-klib-test.iml
new file mode 100644
index 0000000..f08604b
--- /dev/null
+++ b/.idea/create-klib-test.iml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..79b3c94
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..7c324be
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/klibtest.xml b/.idea/runConfigurations/klibtest.xml
new file mode 100644
index 0000000..731ea09
--- /dev/null
+++ b/.idea/runConfigurations/klibtest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..a450e76
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,10 @@
+cmake_minimum_required(VERSION 3.8)
+
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/KotlinCMakeModule)
+
+project(create_klib_test Kotlin)
+
+konanc_library(
+ NAME klibtest
+ SOURCES src
+)
diff --git a/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake b/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake
new file mode 100644
index 0000000..0320d7f
--- /dev/null
+++ b/KotlinCMakeModule/CMakeDetermineKotlinCompiler.cmake
@@ -0,0 +1,38 @@
+if (NOT CMAKE_Kotlin_COMPILER)
+ #TODO determine Kotlin compiler in not hardcoded way
+ set(Kotlin_BIN_PATH
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3/bin
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3.1/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3.1/bin
+ $ENV{HOME}/.konan/kotlin-native-macos-0.3.2/bin
+ $ENV{HOME}/.konan/kotlin-native-linux-0.3.2/bin
+ )
+
+
+ if (CMAKE_Kotlin_COMPILER_INIT)
+ set(CMAKE_Kotlin_COMPILER ${CMAKE_Kotlin_COMPILER_INIT} CACHE PATH "Kotlin Compiler")
+ else ()
+ find_program(CMAKE_Kotlin_COMPILER
+ NAMES konanc
+ PATHS ${Kotlin_BIN_PATH}
+ )
+ endif ()
+
+
+ if (CMAKE_Kotlin_CINTEROP_INIT)
+ set(CMAKE_Kotlin_CINTEROP ${CMAKE_Kotlin_CINTEROP_INIT} CACHE PATH "Kotlin Cinterop")
+ else ()
+ find_program(CMAKE_Kotlin_CINTEROP
+ NAMES cinterop
+ PATHS ${Kotlin_BIN_PATH}
+ )
+ endif ()
+endif ()
+
+mark_as_advanced(CMAKE_Kotlin_COMPILER)
+
+configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeKotlinCompiler.cmake.in
+ ${CMAKE_PLATFORM_INFO_DIR}/CMakeKotlinCompiler.cmake @ONLY)
+
+set(CMAKE_Kotlin_COMPILER_ENV_VAR "KOTLIN_COMPILER")
\ No newline at end of file
diff --git a/KotlinCMakeModule/CMakeKotlinCompiler.cmake.in b/KotlinCMakeModule/CMakeKotlinCompiler.cmake.in
new file mode 100644
index 0000000..4a69230
--- /dev/null
+++ b/KotlinCMakeModule/CMakeKotlinCompiler.cmake.in
@@ -0,0 +1,5 @@
+set(CMAKE_Kotlin_COMPILER "@CMAKE_Kotlin_COMPILER@")
+set(CMAKE_Kotlin_COMPILER_LOADED 1)
+
+set(CMAKE_Kotlin_SOURCE_FILE_EXTENSIONS kt;def)
+set(CMAKE_Kotlin_COMPILER_ENV_VAR "KOTLIN_COMPILER")
\ No newline at end of file
diff --git a/KotlinCMakeModule/CMakeKotlinInformation.cmake b/KotlinCMakeModule/CMakeKotlinInformation.cmake
new file mode 100644
index 0000000..e87ca88
--- /dev/null
+++ b/KotlinCMakeModule/CMakeKotlinInformation.cmake
@@ -0,0 +1,347 @@
+if (CMAKE_USER_MAKE_RULES_OVERRIDE)
+ # Save the full path of the file so try_compile can use it.
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
+endif ()
+
+if (CMAKE_USER_MAKE_RULES_OVERRIDE_Kotlin)
+ # Save the full path of the file so try_compile can use it.
+ include(${CMAKE_USER_MAKE_RULES_OVERRIDE_Kotlin} RESULT_VARIABLE _override)
+ set(CMAKE_USER_MAKE_RULES_OVERRIDE_Kotlin "${_override}")
+endif ()
+
+if (NOT CMAKE_Kotlin_COMPILE_OBJECT)
+ set(CMAKE_Kotlin_COMPILE_OBJECT "")
+ # more native CMake without cinterop would be:
+ # set(CMAKE_Kotlin_COMPILE_OBJECT "$(CMAKE_COMMAND) -E copy