From c03df5c72c889b4f936e7f75bb7153775fbbd8cb Mon Sep 17 00:00:00 2001 From: Frederik Vannoote Date: Wed, 15 Feb 2017 08:09:58 +0100 Subject: [PATCH] Do not use BUILD_SHARED_LIBS as define in the code. When this define is used in other libraries as well, it can have a different value. If so, it leads to wrongly defined export symbols. --- CommonConfig.cmake | 2 +- config.cmake.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonConfig.cmake b/CommonConfig.cmake index 5c86b56..fd1ff75 100644 --- a/CommonConfig.cmake +++ b/CommonConfig.cmake @@ -24,7 +24,7 @@ if (NOT DEFINED BUILD_SHARED_LIBS) endif() # When set to OFF, the library will be built as a static library if (${BUILD_SHARED_LIBS}) - add_definitions(-DBUILD_SHARED_LIBS) + add_definitions(-D${PROJECT_NAME}_BUILD_SHARED_LIBS) endif() diff --git a/config.cmake.in b/config.cmake.in index 7d9ceba..3e095a2 100644 --- a/config.cmake.in +++ b/config.cmake.in @@ -29,5 +29,5 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) include_directories(@TARGET_INCLUDE_INSTALL_DIRS@) if (@BUILD_SHARED_LIBS@) - add_definitions(-DBUILD_SHARED_LIBS) + add_definitions(-D@PROJECT_NAME@_BUILD_SHARED_LIBS) endif()