diff --git a/logging/CMakeLists.txt b/logging/CMakeLists.txt index 5d4cdd0d..45071523 100644 --- a/logging/CMakeLists.txt +++ b/logging/CMakeLists.txt @@ -19,21 +19,23 @@ target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog) if(WIN32) if(BUILD_SHARED_LIBS) target_compile_definitions(${PROJECT_NAME} - PRIVATE LOGGER_API=__declspec(dllexport) + PRIVATE "LOGGER_API=__declspec(dllexport)" + INTERFACE "LOGGER_API=__declspec(dllimport)" ) else() target_compile_definitions(${PROJECT_NAME} - PUBLIC LOGGER_API + PUBLIC "LOGGER_API" ) endif() else() if(BUILD_SHARED_LIBS) target_compile_definitions(${PROJECT_NAME} - PRIVATE LOGGER_API=__attribute__((visibility("default"))) + PRIVATE "LOGGER_API=__attribute__((visibility(\"default\")))" + INTERFACE "LOGGER_API=__attribute__((visibility(\"default\"))" ) else() target_compile_definitions(${PROJECT_NAME} - PUBLIC LOGGER_API + PUBLIC "LOGGER_API" ) endif() endif() \ No newline at end of file