diff options
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake index 5b42b77..758eb25 100644 --- a/Modules/GenerateExportHeader.cmake +++ b/Modules/GenerateExportHeader.cmake @@ -178,10 +178,10 @@ macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY) set(DEFINE_IMPORT) set(DEFINE_NO_EXPORT) - if (COMPILER_HAS_DEPRECATED_DECLSPEC) - set(DEFINE_DEPRECATED "__declspec(deprecated)") - elseif(COMPILER_HAS_DEPRECATED) + if (COMPILER_HAS_DEPRECATED_ATTR) set(DEFINE_DEPRECATED "__attribute__ ((__deprecated__))") + elseif(COMPILER_HAS_DEPRECATED) + set(DEFINE_DEPRECATED "__declspec(deprecated)") endif() get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE) |