https://github.com/Kitware/CMake
Revision 2509c7678feb2efab79a384fd0b0b35cee8d02b0 authored by Stephen Kelly on 13 January 2014, 12:04:03 UTC, committed by Stephen Kelly on 13 January 2014, 14:53:00 UTC
Commit 5bb53f6b (cmTarget: Deprecate COMPILE_DEFINITIONS_ properties
with a policy., 2013-12-30) deprecated the config-specific
COMPILE_DEFINITIONS_* properties in favour of using generator
expressions.

Set the directory property in UseQt4.cmake to match the
INTERFACE_COMPILE_DEFINITIONS on the Qt4::QtCore and Qt5::Core
IMPORTED targets.  Setting QT_NO_DEBUG is sufficient because qglobal.h
sets the corresponding QT_DEBUG definition if required.
1 parent 325ca1f
Raw File
Tip revision: 2509c7678feb2efab79a384fd0b0b35cee8d02b0 authored by Stephen Kelly on 13 January 2014, 12:04:03 UTC
Qt4: Use generator expression in COMPILE_DEFINITIONS (#14692)
Tip revision: 2509c76
cmLinkLibrariesCommand.cxx
/*============================================================================
  CMake - Cross Platform Makefile Generator
  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium

  Distributed under the OSI-approved BSD License (the "License");
  see accompanying file Copyright.txt for details.

  This software is distributed WITHOUT ANY WARRANTY; without even the
  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the License for more information.
============================================================================*/
#include "cmLinkLibrariesCommand.h"

// cmLinkLibrariesCommand
bool cmLinkLibrariesCommand
::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
{
  if(args.size() < 1 )
    {
    return true;
    }
  // add libraries, nothe that there is an optional prefix
  // of debug and optimized than can be used
  for(std::vector<std::string>::const_iterator i = args.begin();
      i != args.end(); ++i)
    {
    if (*i == "debug")
      {
      ++i;
      if(i == args.end())
        {
        this->SetError("The \"debug\" argument must be followed by "
                       "a library");
        return false;
        }
      this->Makefile->AddLinkLibrary(i->c_str(),
                                 cmTarget::DEBUG);
      }
    else if (*i == "optimized")
      {
      ++i;
      if(i == args.end())
        {
        this->SetError("The \"optimized\" argument must be followed by "
                       "a library");
        return false;
        }
      this->Makefile->AddLinkLibrary(i->c_str(),
                                 cmTarget::OPTIMIZED);
      }
    else
      {
      this->Makefile->AddLinkLibrary(i->c_str());
      }
    }

  return true;
}

back to top