obsproject / obs-plugintemplate

GNU General Public License v2.0
289 stars 134 forks source link

cmake: Fix files directly in data directory breaking project generation #74

Closed gxalpha closed 1 year ago

gxalpha commented 1 year ago

Description

Fixes files directly in the data directory breaking the cmake project generation. @PatTheMav suggested this fix, which also brings this function in line with the one used in obs-studio. The template may get rewritten again at some point, but until then I think it's useful to fix the problem.

Motivation and Context

Having a file directly in the data directory would break the cmake project generation:

CMake Error at cmake/ObsPluginHelpers.cmake:469 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  cmake/ObsPluginHelpers.cmake:456 (install_bundle_resources)
  CMakeLists.txt:95 (setup_plugin_target)

How Has This Been Tested?

Tested that this fix works with a plugin I made where I ran into the problem.

Types of changes

Checklist: