Bug 270728

Summary: CMakeLists.txt:159 doesn't specify which target needs to link to QtScript library
Product: [Applications] digikam Reporter: Christoph Feck <cfeck>
Component: Portability-CmakeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.0
Sentry Crash Report:

Description Christoph Feck 2011-04-12 04:26:07 UTC
Version:           unspecified (using Devel) 
OS:                Linux

CMakeLists.txt line 159 says:

#---------------following code is to add the QtScript libraries-----------------------

TARGET_LINK_LIBRARIES(${QT_QTSCRIPT_LIBRARY})

The syntax, however, is "TARGET_LINK_LIBRARIES(target [library] ...)"

This results in the following warning when configuring with CMake 2.8.3. I suggest to just remove this line, as it doesn't work anyway, or correctly apply it to the targets that need linking to QtScript.

CMake Warning (dev) at CMakeLists.txt:159 (TARGET_LINK_LIBRARIES):
  Cannot specify link libraries for target "Qt4::QtScript" which is not built
  by this project.

  CMake does not support this but it used to work accidentally and is being
  allowed for compatibility.

  Policy CMP0016 is not set: target_link_libraries() reports error if only
  argument is not a target.  Run "cmake --help-policy CMP0016" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
This warning is for project developers.  Use -Wno-dev to suppress it.



Reproducible: Didn't try
Comment 1 caulier.gilles 2011-04-12 07:02:09 UTC
Git commit c17305ff81b9f50dab8073d35bb2a255167b4c4a by Gilles Caulier.
Committed on 12/04/2011 at 07:07.
Pushed by cgilles into branch 'master'.

remove obsolete line
BUGS: 270728

M  +0    -4    CMakeLists.txt     

http://commits.kde.org/digikam/c17305ff81b9f50dab8073d35bb2a255167b4c4a