obsproject / obs-plugintemplate

GNU General Public License v2.0
307 stars 141 forks source link

Remove generated header file from the /src tree #68

Closed glikely closed 1 year ago

glikely commented 1 year ago

Description

A generated header that is created in the source tree causes problems for multiple build directories using the same tree. The plugin-macros header has this problem. It could be solved by moving the generated file into the build directory, but CMake provides a better option. Instead of using a generated .h file, use the add_compile_definitions() macro to add the needed macros to the compiler configuration. This allows the generation of plugin-macros.generated.h to be dropped entirely.

How Has This Been Tested?

Tested locally on MacOS and Ubuntu, and in GitHub actions CI

Types of changes

Checklist:

glikely commented 1 year ago

Oops, flubbed the commit. I'll fix and resubmit in a moment