# How to not append an extension to OUTPUT\_NAME automatically?

**URL:** https://discourse.cmake.org/t/how-to-not-append-an-extension-to-output-name-automatically/5571
**Category:** Code
**Created:** [April 29, 2022, 11:48am UTC](https://discourse.cmake.org/t/how-to-not-append-an-extension-to-output-name-automatically/5571 "2022-04-29T11:48:34Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mscofield0](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mscofield0/32/1413_2.png) [@mscofield0](https://discourse.cmake.org/u/mscofield0)
#### Post date: [April 29, 2022, 11:48am UTC](https://discourse.cmake.org/t/how-to-not-append-an-extension-to-output-name-automatically/5571/1 "2022-04-29T11:48:34Z")

</div>

Hi, I need to output a library and executable with a custom extension, but currently if I specify the extension within the `OUTPUT_NAME` string, CMake automatically appends another extension on that string. I don’t want this to happen. Is there a flag or something to disable this behaviour on a single target?

---

<div class="post-metadata">

### Author: ![fenrir](https://discourse.cmake.org/user_avatar/discourse.cmake.org/fenrir/32/734_2.png) [@fenrir](https://discourse.cmake.org/u/fenrir)
#### Post date: [April 29, 2022, 12:11pm UTC](https://discourse.cmake.org/t/how-to-not-append-an-extension-to-output-name-automatically/5571/2 "2022-04-29T12:11:21Z")

</div>

Example:

```auto
add_library(node-sapnwrfc SHARED ${Sources} ${CMAKE_JS_SRC})
...
set_target_properties(node-sapnwrfc PROPERTIES
        OUTPUT_NAME sapnwrfc
        PREFIX ""
        SUFFIX .node)

```

Produces “sapnwrfc.node” on all platforms.
