Commit 32f30329 authored by Ghislain MARY's avatar Ghislain MARY

Fix definition of BELR_PUBLIC for static build.

parent e9acc91a
......@@ -117,6 +117,16 @@ if(STRICT_OPTIONS_C)
list(REMOVE_DUPLICATES STRICT_OPTIONS_C)
endif()
set(BELR_CPPFLAGS ${BCTOOLBOX_CPPFLAGS})
if(ENABLE_STATIC)
list(APPEND BELR_CPPFLAGS "-DBELR_STATIC")
endif()
list(REMOVE_DUPLICATES BELR_CPPFLAGS)
if(BELR_CPPFLAGS)
add_definitions(${BELR_CPPFLAGS})
endif()
add_definitions("-DBELR_EXPORTS")
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
set(EXPORT_TARGETS_NAME "LinphoneBuilder")
else()
......
......@@ -26,6 +26,7 @@
# BELR_FOUND - system has belr
# BELR_INCLUDE_DIRS - the belr include directory
# BELR_LIBRARIES - The libraries needed to use belr
# BELR_CPPFLAGS - The compilation flags needed to use belr
if(NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
include("${CMAKE_CURRENT_LIST_DIR}/BelrTargets.cmake")
......@@ -44,4 +45,5 @@ else()
set(BELR_LIBRARIES belr-static)
endif()
set(BELR_CPPFLAGS @BELR_CPPFLAGS@)
set(BELR_FOUND 1)
......@@ -8,10 +8,18 @@
using namespace ::std;
#if defined(_MSC_VER)
#define BELR_PUBLIC __declspec(dllexport)
#ifdef _MSC_VER
#ifdef BELR_STATIC
#define BELR_PUBLIC
#else
#ifdef BELR_EXPORTS
#define BELR_PUBLIC __declspec(dllexport)
#else
#define BELR_PUBLIC __declspec(dllimport)
#endif
#endif
#else
#define BELR_PUBLIC
#define BELR_PUBLIC
#endif
namespace belr{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment