diff options
author | Stephen Kelly <steveire@gmail.com> | 2011-08-08 00:08:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2011-08-08 00:08:10 (GMT) |
commit | def0a54e0ae20d783aecf2761a4add5f40687cd6 (patch) | |
tree | bacca14f3bcc6f4933e57e94b766201f75202c75 /Modules/GenerateExportHeader.cmake | |
parent | 30880707c094ac5c0edd85d0857afb6fbae55326 (diff) | |
download | CMake-def0a54e0ae20d783aecf2761a4add5f40687cd6.zip CMake-def0a54e0ae20d783aecf2761a4add5f40687cd6.tar.gz CMake-def0a54e0ae20d783aecf2761a4add5f40687cd6.tar.bz2 |
Handle the case where the user changes the DEFINE_SYMBOL property.
This eases porting of KDE code.
Diffstat (limited to 'Modules/GenerateExportHeader.cmake')
-rw-r--r-- | Modules/GenerateExportHeader.cmake | 6 |
1 files changed, 6 insertions, 0 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() |