summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/GenerateExportHeader.cmake6
-rw-r--r--Modules/exportheader.cmake.in2
2 files changed, 7 insertions, 1 deletions
diff --git a/Modules/GenerateExportHeader.cmake b/Modules/GenerateExportHeader.cmake
index c717899..3665817 100644
--- a/Modules/GenerateExportHeader.cmake
+++ b/Modules/GenerateExportHeader.cmake
@@ -188,6 +188,12 @@ macro(_DO_GENERATE_EXPORT_HEADER TARGET_LIBRARY)
set(INCLUDE_GUARD_NAME "${PREFIX}${EXPORT_MACRO_NAME}_H")
+ get_target_property(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY} DEFINE_SYMBOL)
+
+ if (NOT EXPORT_IMPORT_CONDITION)
+ set(EXPORT_IMPORT_CONDITION ${TARGET_LIBRARY}_EXPORTS)
+ endif()
+
configure_file(${myDir}/exportheader.cmake.in ${EXPORT_FILE_NAME} @ONLY)
endmacro()
diff --git a/Modules/exportheader.cmake.in b/Modules/exportheader.cmake.in
index 083e95c..62ed3ff 100644
--- a/Modules/exportheader.cmake.in
+++ b/Modules/exportheader.cmake.in
@@ -7,7 +7,7 @@
# define @NO_EXPORT_MACRO_NAME@
#else
# ifndef @EXPORT_MACRO_NAME@
-# ifdef @TARGET_LIBRARY@_EXPORTS
+# ifdef @EXPORT_IMPORT_CONDITION@
/* We are building this library */
# define @EXPORT_MACRO_NAME@ @DEFINE_EXPORT@
# else