[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-buildsystem
Subject:    Re: Reducing excess linkage - cmake 2.6 IMPORTED targets and
From:       Dirk Mueller <mueller () kde ! org>
Date:       2008-06-26 13:41:14
Message-ID: 200806261541.15263.mueller () kde ! org
[Download RAW message or body]

On Thursday 26 June 2008, Alexander Neundorf wrote:

> Currently this patch does two things
> -it adds more libs to the TARGET_LINK_LIBRARIES() calls - wouldn't hurt to
> commit that part

exactly, and it is the right thing to do. 

> -it sets the LINK_INTERFACE_LIBRARIES target property - this can hurt with
> cmake 2.6 even if that option is not enabled

Hmm, okay. I think we can fix that via another level of indirection:

Index: MacroOptionalDependPackage.cmake
===================================================================
--- MacroOptionalDependPackage.cmake	(Revision 824638)
+++ MacroOptionalDependPackage.cmake	(Arbeitskopie)
@@ -13,10 +13,11 @@ MACRO (MACRO_OPTIONAL_DEPEND_PACKAGE _na
    set(_packagename Find${_name}.cmake)
    find_file(_PACKAGE_DEPEND_FOUND ${_packagename} PATHS ${CMAKE_MODULE_PATH} )
    if(NOT _PACKAGE_DEPEND_FOUND)
-	MESSAGE(STATUS "cmake package ${_packagename} was not found. This package 
needs ${_module_needed} to be compile all program")
-	set(DEPEND_PACKAGE_${_name} FALSE)
+      MESSAGE(STATUS "cmake package ${_packagename} not found, optional 
dependency ${_module_needed}")
+      set(DEPEND_PACKAGE_${_name} FALSE)
    else(NOT _PACKAGE_DEPEND_FOUND)
-   	set(DEPEND_PACKAGE_${_name} TRUE)	   
+      set(DEPEND_PACKAGE_${_name} TRUE)
    endif(NOT _PACKAGE_DEPEND_FOUND)
+   macro_log_feature(_PACKAGE_DEPEND_FOUND "${_packagename}" 
"${_module_needed}" "" FALSE "" "Optional dependency")
 ENDMACRO (MACRO_OPTIONAL_DEPEND_PACKAGE)
 
--- KDE4Macros.cmake
+++ KDE4Macros.cmake
@@ -1186,6 +1186,11 @@ macro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES
    endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT  AND  UNIX)#  AND NOT APPLE)
 endmacro(_KDE4_EXPORT_LIBRARY_DEPENDENCIES)
 
+macro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES _target _interface_libs)
+   if(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT  AND  UNIX )# AND NOT APPLE)
+      set_target_properties("${_target}" "${_interface_libs}")
+   endif(KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT  AND  UNIX)#  AND NOT APPLE)
+endmacro (KDE4_TARGET_LINK_INTERFACE_LIBRARIES)
 
 macro (KDE4_INSTALL_HANDBOOK _lang)
    message(STATUS "KDE4_INSTALL_HANDBOOK() is deprecated. Remove it please. 

> I don't see a lot of sense in committing only the first part of it. If you
> think it makes sense, I can do that tomorrow.

I think both parts make sense to be committed. one part can't hurt, the other 
one is off-by-default. 

Greetings,
Dirk
_______________________________________________
Kde-buildsystem mailing list
Kde-buildsystem@kde.org
https://mail.kde.org/mailman/listinfo/kde-buildsystem
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic