Bug 270728 - CMakeLists.txt:159 doesn't specify which target needs to link to QtScript library
Summary: CMakeLists.txt:159 doesn't specify which target needs to link to QtScript lib...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 04:26 UTC by Christoph Feck
Modified: 2017-08-20 09:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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