Add missing NO_EXPORT macro variant.
This commit is contained in:
parent
1b031d1a3f
commit
e0cc024dc9
|
@ -221,8 +221,8 @@ endmacro()
|
||||||
|
|
||||||
macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
|
macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
|
||||||
# Option overrides
|
# Option overrides
|
||||||
set(options)
|
set(options DEFINE_NO_DEPRECATED)
|
||||||
set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE)
|
set(oneValueArgs PREFIX_NAME BASE_NAME EXPORT_MACRO_NAME EXPORT_FILE_NAME DEPRECATED_MACRO_NAME NO_EXPORT_MACRO_NAME STATIC_DEFINE NO_DEPRECATED_MACRO_NAME)
|
||||||
set(multiValueArgs)
|
set(multiValueArgs)
|
||||||
|
|
||||||
cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(_GEH "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
@ -242,6 +242,7 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
|
||||||
set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h")
|
set(EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME_LOWER}_export.h")
|
||||||
set(DEPRECATED_MACRO_NAME "${PREFIX}${BASE_NAME_UPPER}_DEPRECATED")
|
set(DEPRECATED_MACRO_NAME "${PREFIX}${BASE_NAME_UPPER}_DEPRECATED")
|
||||||
set(STATIC_DEFINE "${PREFIX}${BASE_NAME_UPPER}_STATIC_DEFINE")
|
set(STATIC_DEFINE "${PREFIX}${BASE_NAME_UPPER}_STATIC_DEFINE")
|
||||||
|
set(NO_DEPRECATED_MACRO_NAME "${BASE_NAME_UPPER}_NO_DEPRECATED")
|
||||||
|
|
||||||
if(_GEH_UNPARSED_ARGUMENTS)
|
if(_GEH_UNPARSED_ARGUMENTS)
|
||||||
message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"")
|
message(FATAL_ERROR "Unknown keywords given to GENERATE_EXPORT_HEADER(): \"${_GEH_UNPARSED_ARGUMENTS}\"")
|
||||||
|
@ -267,6 +268,14 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
|
||||||
set(STATIC_DEFINE ${PREFIX}${_GEH_STATIC_DEFINE})
|
set(STATIC_DEFINE ${PREFIX}${_GEH_STATIC_DEFINE})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (_GEH_DEFINE_NO_DEPRECATED)
|
||||||
|
set(DEFINE_NO_DEPRECATED TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (_GEH_NO_DEPRECATED_MACRO_NAME)
|
||||||
|
set(NO_DEPRECATED_MACRO_NAME ${PREFIX}${_GEH_NO_DEPRECATED_MACRO_NAME})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(INCLUDE_GUARD_NAME "${PREFIX}${EXPORT_MACRO_NAME}_H")
|
set(INCLUDE_GUARD_NAME "${PREFIX}${EXPORT_MACRO_NAME}_H")
|
||||||
|
|
||||||
get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL)
|
get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL)
|
||||||
|
|
|
@ -27,4 +27,9 @@
|
||||||
# define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEFINE_DEPRECATED@
|
# define @DEPRECATED_MACRO_NAME@_NO_EXPORT @NO_EXPORT_MACRO_NAME@ @DEFINE_DEPRECATED@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#cmakedefine01 DEFINE_NO_DEPRECATED
|
||||||
|
#if DEFINE_NO_DEPRECATED
|
||||||
|
# define @NO_DEPRECATED_MACRO_NAME@
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // @INCLUDE_GUARD_NAME@
|
#endif // @INCLUDE_GUARD_NAME@
|
Loading…
Reference in New Issue