Skip to content
Permalink
Browse files
[o2] fix static linking on windows
  • Loading branch information
m-kuhn committed Nov 15, 2021
1 parent 6ca82a2 commit 4ea78b3a1cbfe43c1fbe002e5389ef706de092b3
Showing with 6 additions and 2 deletions.
  1. +4 −0 external/o2/src/CMakeLists.txt
  2. +2 −2 external/o2/src/o0export.h
@@ -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)
@@ -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 4ea78b3

Please sign in to comment.