# Multiplatform multiple native targets, same source code

**URL:** <https://discuss.kotlinlang.org/t/multiplatform-multiple-native-targets-same-source-code/11276>\
**Category:** Native\
**Created:** [January 23, 2019, 1:12am UTC](https://discuss.kotlinlang.org/t/multiplatform-multiple-native-targets-same-source-code/11276 "2019-01-23T01:12:45Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![msink](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/msink/32/3336_2.png) [@msink](https://discuss.kotlinlang.org/u/msink)\
**Post date:** [January 23, 2019, 3:29pm UTC](https://discuss.kotlinlang.org/t/multiplatform-multiple-native-targets-same-source-code/11276/10 "2019-01-23T15:29:38Z")

</div>

I do not know, and as it does not work in IDEA still use old trick:

```auto
        sourceSets["macosxMain"].apply {
            kotlin.srcDir("src/nativeMain/kotlin")
        }
        sourceSets["linuxMain"].apply {
            kotlin.srcDir("src/nativeMain/kotlin")
        }

```

---

_[View the full topic](https://discuss.kotlinlang.org/t/multiplatform-multiple-native-targets-same-source-code/11276)._
