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()