# CMake Linux VST3 Not Stripped?

**URL:** <https://forum.juce.com/t/cmake-linux-vst3-not-stripped/39617>\
**Category:** Linux\
**Created:** [May 22, 2020, 1:59pm UTC](https://forum.juce.com/t/cmake-linux-vst3-not-stripped/39617 "2020-05-22T13:59:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [June 1, 2020, 11:25am UTC](https://forum.juce.com/t/cmake-linux-vst3-not-stripped/39617/3 "2020-06-01T11:25:50Z")

</div>

It looks like the Projucer-generated makefile contains a rule named `strip` which runs `strip --strip-unneeded $(TARGET)`. This rule doesn’t run by default, and moreover it appears to be broken in VST3 projects as `$(TARGET)` is not defined. I also can’t see anywhere where the `-s` flag is being passed to the linker. For these reasons, I think any discrepancy between the Projucer and CMake outputs is likely unrelated to symbol stripping.

That being said, if you want to add stripping to your CMake builds, I’d recommend adding a custom interface library which you can then link into any target which requires symbol stripping. That might look like this:

```auto
add_library(strip_flags INTERFACE)

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    target_link_options(strip_flags INTERFACE $<$<CONFIG:Release>:-s>)
endif()

```

Now, when I do a build with the Projucer in Release configuration, I get an 11M build of the DSPModulePluginDemo Standalone, but the same target built with CMake (also in Release configuration) is around 6.2M.

---

_[View the full topic](https://forum.juce.com/t/cmake-linux-vst3-not-stripped/39617)._
