summaryrefslogtreecommitdiffstats
path: root/Modules/GenerateExportHeader.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-03-14 15:37:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-05-23 17:24:34 (GMT)
commit7ffef5024aa92a9802785c2e02abfd13249e6160 (patch)
tree0fa34653d6c37c548eeb0a7217af85262a7cf9ed /Modules/GenerateExportHeader.cmake
parent711073e8c659291fc21a1498a1240eef4922369c (diff)
downloadCMake-7ffef5024aa92a9802785c2e02abfd13249e6160.zip
CMake-7ffef5024aa92a9802785c2e02abfd13249e6160.tar.gz
CMake-7ffef5024aa92a9802785c2e02abfd13249e6160.tar.bz2
GenerateExportHeader: Allow use of of this macro with MODULEs.
The significant issue with MODULEs is that on Windows, the exported symbols must be dllexported and they are not imported. In other export macro implementations this is done by defining an export macro outside of any ifdef which depends on definitions set on the command line. However, with cmake we already expect the DEFINE_SYMBOL to be defined, so the regular EXPORT macro can be used by such plugins.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r--Modules/GenerateExportHeader.cmake8
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index 892ebc6..80475a8 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -307,11 +307,9 @@ endmacro()
function(GENERATE_EXPORT_HEADER TARGET_LIBRARY)
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
- if(${type} STREQUAL "MODULE")
- message(WARNING "This macro should not be used with libraries of type MODULE")
- return()
- endif()
- if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY")
+ if(NOT ${type} STREQUAL "STATIC_LIBRARY"
+ AND NOT ${type} STREQUAL "SHARED_LIBRARY"
+ AND NOT ${type} STREQUAL "MODULE_LIBRARY")
message(WARNING "This macro can only be used with libraries")
return()
endif()