diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e17bc23..3833e83a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -254,6 +254,7 @@ target_sources( src/utils/curl-helper.hpp src/utils/duration-control.cpp src/utils/duration-control.hpp + src/utils/export-symbol-helper.hpp src/utils/item-selection-helpers.cpp src/utils/item-selection-helpers.hpp src/utils/log-helper.hpp @@ -375,6 +376,8 @@ target_include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/deps/obs-websocket/lib" "${CMAKE_CURRENT_SOURCE_DIR}/deps/exprtk") +target_compile_definitions(${LIB_NAME} PRIVATE ADVSS_EXPORT_SYMBOLS=1) + # --- End of section --- # --- Windows-specific build settings and tasks --- diff --git a/src/utils/export-symbol-helper.hpp b/src/utils/export-symbol-helper.hpp new file mode 100644 index 00000000..e81dea91 --- /dev/null +++ b/src/utils/export-symbol-helper.hpp @@ -0,0 +1,8 @@ +#pragma once + +// Helpers helper to enable exporting and importing custom Qt widget symbols +#ifdef ADVSS_EXPORT_SYMBOLS +#define ADVSS_EXPORT Q_DECL_EXPORT +#else +#define ADVSS_EXPORT Q_DECL_IMPORT +#endif \ No newline at end of file diff --git a/src/utils/item-selection-helpers.hpp b/src/utils/item-selection-helpers.hpp index 6a55016e..7d1e52e8 100644 --- a/src/utils/item-selection-helpers.hpp +++ b/src/utils/item-selection-helpers.hpp @@ -1,5 +1,6 @@ #pragma once #include "filter-combo-box.hpp" +#include "export-symbol-helper.hpp" #include #include @@ -11,8 +12,8 @@ namespace advss { -class ItemSelection; -class ItemSettingsDialog; +class ADVSS_EXPORT ItemSelection; +class ADVSS_EXPORT ItemSettingsDialog; class Item { public: