Merge pull request #4914 from Devolutions/winpr-dll-export
Add WINPR_DLL definition to control WinPR symbol exporting
This commit is contained in:
commit
ce234411c9
@ -1037,6 +1037,10 @@ else()
|
||||
set(PRIVATE_KEYWORD "PRIVATE")
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINPR_DLL")
|
||||
endif()
|
||||
|
||||
add_subdirectory(winpr)
|
||||
|
||||
# Sub-directories
|
||||
|
@ -158,6 +158,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINPR_DLL")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWINPR_EXPORTS")
|
||||
|
||||
# Enable 64bit file support on linux and FreeBSD.
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include <winpr/platform.h>
|
||||
|
||||
#ifdef WINPR_DLL
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#ifdef WINPR_EXPORTS
|
||||
#ifdef __GNUC__
|
||||
@ -42,6 +43,9 @@
|
||||
#define WINPR_API
|
||||
#endif
|
||||
#endif
|
||||
#else /* WINPR_DLL */
|
||||
#define WINPR_API
|
||||
#endif
|
||||
|
||||
/* Thread local storage keyword define */
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
|
Loading…
x
Reference in New Issue
Block a user