How to not append an extension to OUTPUT_NAME automatically?

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?


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.

1 Like