[CMake] target_link_libraries issues
Rolf Eike Beer
eike at sf-mail.de
Fri May 31 02:45:36 EDT 2013
joza404 wrote:
> Hello everyone, I just started using Cmake and I got a weird issue without a
> peep.
> Let's take a look a simplest-ever-seen CmakeList:
Even too complicated ;) I have no idea about this specific problems, but some
general remarks.
> /cmake_minimum_required(VERSION 2.8)
> project(test)
This is a bad name for a project as CMake will create a "test" target itself
when you include CTest for example. This can afterwards cause all sort of
confusion because of colliding targets in the makefile and whatnot.
> find_package(SDL REQUIRED)
> if(NOT SDL_FOUND)
This is either not required at all or a bug in the SDL module. If SDL is not
found but marked as REQUIRED CMake should abort with an error. If it does not
please file a bug report against the SDL module. Otherwise you only need the
else branch here at all as nothing else can ever be executed.
Greetins,
Eike
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130531/5c129059/attachment.pgp>
More information about the CMake
mailing list