[CMake] problems with LINK_DIRECTORIES

Darko Miletic darko at uvcms.com
Mon Sep 19 20:49:04 EDT 2005


Hi to all,

I started to use CMake since version 2.05 and it was working to my
satisfaction quite good. However I encountered a problem with beta
version 2.2 and 2.2.1 in conjunction with borland compiler.

If I have a program in main.cpp that links o a external lib file located
in some other folder and I specify that folder with LINK_DIRECTORIES and
place it after ADD_EXECUTABLE it will not add directory to the link
search folder list.

PROJECT(Test)

ADD_EXECUTABLE(Main main.cpp)

LINK_DIRECTORIES(C:/external/lib)
	
Above will produce incorrect makefile in that way that it will not
include added link_directories folder for linker search.

If I change the sample script to be like this:
PROJECT(Test)

LINK_DIRECTORIES(C:/external/lib)

ADD_EXECUTABLE(Main main.cpp)

Everything works fine. In prevoious versions 2.0x it was working fine
both ways.

Is this a bug or feature?

Darko


---
avast! Antivirus: Mensaje saliente limpio.
Base de datos de Virus (VPS): 0538-2, 19/09/2005
Comprobado el: 19/09/2005 09:49:09 p.m.
avast! - copyright (c) 1988-2005 ALWIL Software.
http://www.avast.com






More information about the CMake mailing list