Fix the feature of using a specific prefix for macros.

This commit is contained in:
Stephen Kelly 2011-08-25 18:51:37 +02:00
parent 3449f6b88c
commit 51bc63a7cb
1 changed files with 11 additions and 11 deletions

View File

@ -237,19 +237,19 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
string(TOLOWER ${BASE_NAME} BASE_NAME_LOWER)
# Default options
set(EXPORT_MACRO_NAME "${PREFIX}${BASE_NAME_UPPER}_EXPORT")
set(NO_EXPORT_MACRO_NAME "${PREFIX}${BASE_NAME_UPPER}_NO_EXPORT")
set(EXPORT_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_EXPORT")
set(NO_EXPORT_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_EXPORT")
set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h")
set(DEPRECATED_MACRO_NAME "${PREFIX}${BASE_NAME_UPPER}_DEPRECATED")
set(STATIC_DEFINE "${PREFIX}${BASE_NAME_UPPER}_STATIC_DEFINE")
set(NO_DEPRECATED_MACRO_NAME "${BASE_NAME_UPPER}_NO_DEPRECATED")
set(DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_DEPRECATED")
set(STATIC_DEFINE "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_STATIC_DEFINE")
set(NO_DEPRECATED_MACRO_NAME "${_GEH_PREFIX_NAME}${BASE_NAME_UPPER}_NO_DEPRECATED")
if(_GEH_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"")
endif()
if(_GEH_EXPORT_MACRO_NAME)
set(EXPORT_MACRO_NAME ${PREFIX}${_GEH_EXPORT_MACRO_NAME})
set(EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_EXPORT_MACRO_NAME})
endif()
if(_GEH_EXPORT_FILE_NAME)
if(IS_ABSOLUTE _GEH_EXPORT_FILE_NAME)
@ -259,13 +259,13 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
endif()
endif()
if(_GEH_DEPRECATED_MACRO_NAME)
set(DEPRECATED_MACRO_NAME ${PREFIX}${_GEH_DEPRECATED_MACRO_NAME})
set(DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_DEPRECATED_MACRO_NAME})
endif()
if(_GEH_NO_EXPORT_MACRO_NAME)
set(NO_EXPORT_MACRO_NAME ${PREFIX}${_GEH_NO_EXPORT_MACRO_NAME})
set(NO_EXPORT_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_EXPORT_MACRO_NAME})
endif()
if(_GEH_STATIC_DEFINE)
set(STATIC_DEFINE ${PREFIX}${_GEH_STATIC_DEFINE})
set(STATIC_DEFINE ${_GEH_PREFIX_NAME}${_GEH_STATIC_DEFINE})
endif()
if (_GEH_DEFINE_NO_DEPRECATED)
@ -273,10 +273,10 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
endif()
if (_GEH_NO_DEPRECATED_MACRO_NAME)
set(NO_DEPRECATED_MACRO_NAME ${PREFIX}${_GEH_NO_DEPRECATED_MACRO_NAME})
set(NO_DEPRECATED_MACRO_NAME ${_GEH_PREFIX_NAME}${_GEH_NO_DEPRECATED_MACRO_NAME})
endif()
set(INCLUDE_GUARD_NAME "${PREFIX}${EXPORT_MACRO_NAME}_H")
set(INCLUDE_GUARD_NAME "${EXPORT_MACRO_NAME}_H")
get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL)