jamboree / bustache

C++20 implementation of {{ mustache }}
82 stars 10 forks source link

Closes #15: Improve CMake package integration #17

Closed mbeutel closed 5 years ago

mbeutel commented 5 years ago

Closes #15. See issue description for motivation of changes.

Note that I also snuck in an additional change which declares bustache a static library. That means it will be built as a static library even if the global flag BUILD_SHARED_LIBS is enabled.

Reason: To support compiling bustache as a shared library, it would require either a DEF file or __declspec(dllexport) annotations for all exported functions. This is necessary on Windows but also desirable on Unix-like platforms which unfortunately default to exporting all symbols. I think bustache isn't a good candidate for a shared library, so instead of going through all the hassle, we can just say it will always be a static library.