CharmedBaryon / CommonLibSSE-NG

This is a reverse engineered library for Skyrim Special Edition and Skyrim VR.
MIT License
142 stars 32 forks source link

Provide a way in CMAKE to add a static plugin library #80

Closed panic-sell closed 8 months ago

panic-sell commented 1 year ago

Right now add_commonlibsse_plugin() creates a shared library, which makes unit testing cumbersome because we have to export all the to-be-tested classes/functions. We also have to worry about DLL boundary quirks when writing tests.

Being able to statically link tests with plugin code would make things a lot less painful.

jpstewart commented 8 months ago

This is supported by using the following style instead of add_commonlibsse_plugin:

add_library(MyPlugin STATIC Main.cpp)

target_commonlibsse_properties(MyPlugin)