# Building an independent watchOS app using CMake

**URL:** <https://discourse.cmake.org/t/building-an-independent-watchos-app-using-cmake/5885>\
**Category:** Code\
**Created:** [June 17, 2022, 3:23pm UTC](https://discourse.cmake.org/t/building-an-independent-watchos-app-using-cmake/5885 "2022-06-17T15:23:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek\_Mohata](https://discourse.cmake.org/user_avatar/discourse.cmake.org/abhishek_mohata/32/2512_2.png) [@Abhishek\_Mohata](https://discourse.cmake.org/u/Abhishek_Mohata)\
**Post date:** [June 17, 2022, 3:23pm UTC](https://discourse.cmake.org/t/building-an-independent-watchos-app-using-cmake/5885/1 "2022-06-17T15:23:43Z")

</div>

We are building an application that would be cross-platform and hence using CMake as the build system. While am able to build for iOS, macOS, tvOS etc, have not been able to build for watchOS using CMake. Right now, am looking for an independent watchOS app. Can someone help with any pointers or reference link for the same ?

---

<div class="post-metadata">

**Author:** ![benthevining](https://discourse.cmake.org/user_avatar/discourse.cmake.org/benthevining/32/1924_2.png) [@benthevining](https://discourse.cmake.org/u/benthevining)\
**Post date:** [June 17, 2022, 6:39pm UTC](https://discourse.cmake.org/t/building-an-independent-watchos-app-using-cmake/5885/2 "2022-06-17T18:39:01Z")

</div>

What issues are you encountering? To build for WatchOS, simply set CMAKE\_SYSTEM\_NAME to watchOS and CMAKE\_XCODE\_EFFECTIVE\_PLATFORMS to -watchos

---

<div class="post-metadata">

**Author:** ![Abhishek\_Mohata](https://discourse.cmake.org/user_avatar/discourse.cmake.org/abhishek_mohata/32/2512_2.png) [@Abhishek\_Mohata](https://discourse.cmake.org/u/Abhishek_Mohata)\
**Post date:** [June 20, 2022, 4:21am UTC](https://discourse.cmake.org/t/building-an-independent-watchos-app-using-cmake/5885/3 "2022-06-20T04:21:50Z")

</div>

Thanks Ben !  
My project has an ExtensionDelegate and an InterfaceController. When I build the project through CMake, I get ‘\_main’ not found. I have tried giving an entry point via ‘-e WKExtensionMain’ as compile options in CMake. With this the build works fine but none of my code gets linked and the generated .app is around 67KB. Now, even if i try to deploy this 67KN .app on the watch simulator, it says ‘WatchKit 1 apps are not supported on this version of watchOS’. May be am missing something hence wanted to understand the steps.
