Skip to content

Commit

Permalink
Merge pull request #46046 from m-kuhn/o2-static-windows
Browse files Browse the repository at this point in the history
[o2] fix static linking on windows
  • Loading branch information
m-kuhn committed Nov 16, 2021
2 parents 7495f57 + 04c9e86 commit 4171f75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions external/o2/src/CMakeLists.txt
Expand Up @@ -192,6 +192,10 @@ endif(BUILD_SHARED_LIBS AND APPLE AND POLICY CMP0042)

add_library( o2 ${o2_SRCS} ${o2_HDRS} )

if(BUILD_SHARED_LIBS)
add_definitions( -DO2_SHARED_LIB )
endif(BUILD_SHARED_LIBS)

if(o2_WITH_QT5)
target_link_libraries( o2 Qt5::Core Qt5::Network ${LINK_TARGETS})
else(o2_WITH_QT5)
Expand Down
4 changes: 2 additions & 2 deletions external/o2/src/o0export.h
@@ -1,12 +1,12 @@
#pragma once

// For exporting symbols from Windows' DLLs
#ifdef _WIN32
#if defined (_WIN32) && defined(O2_SHARED_LIB)
#ifdef O2_DLL_EXPORT
#define O0_EXPORT __declspec(dllexport)
#else
#define O0_EXPORT __declspec(dllimport)
#endif
#else
#define O0_EXPORT
#endif
#endif

0 comments on commit 4171f75

Please sign in to comment.