meta: add msvc support

since bluelib is already cross-platform, this is mostly just adding
__declspec(dllexport) to the library functions.
This commit is contained in:
2024-11-14 19:30:36 +00:00
parent 51d7fdfb39
commit 646a851a10
17 changed files with 68 additions and 9 deletions

View File

@@ -106,6 +106,10 @@ if (Bluelib_FOUND)
INTERFACE_INCLUDE_DIRECTORIES "${Bluelib_${component}_INCLUDE_DIR}")
target_compile_definitions(Bluelib::${component} INTERFACE _CRT_SECURE_NO_WARNINGS=1)
if (Bluelib_STATIC)
target_compile_definitions(Bluelib::${component} INTERFACE BLUELIB_STATIC=1)
endif ()
set_target_properties(Bluelib::${component} PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${Bluelib_${component}_LIBRARY}")