Fixed a bug where debug library was not set to release library automatically for all custom cmake modules.