Merge topic 'geh-MODULE-export'

7ffef50 GenerateExportHeader: Allow use of of this macro with MODULEs.
This commit is contained in:
Brad King 2013-05-24 09:19:58 -04:00 committed by CMake Topic Stage
commit a2e80aaa82
1 changed files with 3 additions and 5 deletions

View File

@ -307,11 +307,9 @@ endmacro()
function(GENERATE_EXPORT_HEADER TARGET_LIBRARY) function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE) get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
if(${type} STREQUAL "MODULE") if(NOT ${type} STREQUAL "STATIC_LIBRARY"
message(WARNING "This macro should not be used with libraries of type MODULE") AND NOT ${type} STREQUAL "SHARED_LIBRARY"
return() AND NOT ${type} STREQUAL "MODULE_LIBRARY")
endif()
if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY")
message(WARNING "This macro can only be used with libraries") message(WARNING "This macro can only be used with libraries")
return() return()
endif() endif()