aboutsummaryrefslogtreecommitdiff
path: root/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2010-01-17 18:11:01 +0000
committerAlexander Neundorf <neundorf@kde.org>2010-01-17 18:11:01 +0000
commit08134581fe028a5dd1a94b9b8bc2022c7c1e23f9 (patch)
tree2cfe99635e0ed2b5b8202861c8ecd5af04b1dea5 /modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
parent9c18c97448697082b34db4345d3ae527284b408a (diff)
downloadextra-cmake-modules-08134581fe028a5dd1a94b9b8bc2022c7c1e23f9.tar.gz
extra-cmake-modules-08134581fe028a5dd1a94b9b8bc2022c7c1e23f9.tar.bz2
-use imported targets for the Qt4 libs also in the 4.4 release branch
This fixes handling release and debug versions of Qt, and is a major improvement for the deployment of KDE under Windows. Alex svn path=/branches/KDE/4.4/kdelibs/; revision=1076181
Diffstat (limited to 'modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake')
-rw-r--r--modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake b/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
index 28564ab6..e28efd44 100644
--- a/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
+++ b/modules/HandleImportedTargetsInCMakeRequiredLibraries.cmake
@@ -44,15 +44,23 @@ FUNCTION(HANDLE_IMPORTED_TARGETS_IN_CMAKE_REQUIRED_LIBRARIES _RESULT)
ENDIF ("${_CCSR_LOOP_COUNTER}" LESS 100)
LIST(GET _importedConfigs 0 _firstImportedConfig)
- GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} LOCATION_${_firstImportedConfig})
+ IF(NOT WIN32)
+ GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} IMPORTED_LOCATION_${_firstImportedConfig})
+ ELSE(NOT WIN32)
+ GET_TARGET_PROPERTY(_firstImportedLocation ${_CURRENT_LIB} IMPORTED_IMPLIB_${_firstImportedConfig})
+ ENDIF(NOT WIN32)
GET_TARGET_PROPERTY(_linkInterfaceLibs ${_CURRENT_LIB} IMPORTED_LINK_INTERFACE_LIBRARIES_${_firstImportedConfig} )
LIST(APPEND _CCSR_NEW_REQ_LIBS ${_firstImportedLocation})
# MESSAGE(STATUS "Appending lib ${_CURRENT_LIB} as ${_firstImportedLocation}")
- FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+ IF(_linkInterfaceLibs)
+ FOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
# MESSAGE(STATUS "Appending link interface lib ${_currentLinkInterfaceLib}")
- LIST(APPEND _CCSR_NEW_REQ_LIBS ${_currentLinkInterfaceLib} )
- ENDFOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+ IF(_currentLinkInterfaceLib)
+ LIST(APPEND _CCSR_NEW_REQ_LIBS ${_currentLinkInterfaceLib} )
+ ENDIF(_currentLinkInterfaceLib)
+ ENDFOREACH(_currentLinkInterfaceLib ${_linkInterfaceLibs})
+ ENDIF(_linkInterfaceLibs)
ELSE(_importedConfigs)
# "Normal" libraries are just used as they are.
LIST(APPEND _CCSR_NEW_REQ_LIBS ${_CURRENT_LIB} )