[CMake] LINK_DIRECTORIES visual studio 2010

Michael Hertling mhertling at online.de
Fri Jul 29 11:32:01 EDT 2011


On 07/29/2011 05:13 PM, Louis Hoefler wrote:
> Hello everyone.
> I have a simple CMake file
> 
> cmake_minimum_required(VERSION 2.8)
> 
> IF(DEFINED USEFCGI)
>   SET(BACKENDLIB wtfcgi)
> ELSE(DEFINED USEFCGI)
>   SET(BACKENDLIB wthttp)
> ENDIF(DEFINED USEFCGI)
> 
> ADD_EXECUTABLE(construction.wt
>   construction.cpp
> )
> 
> if(WIN32)
>   INCLUDE_DIRECTORIES(D:/work/boost_1_46_1 D:/work/wt-3.1.10/src 
> D:/work/wt-3.1.10/build)
>   LINK_DIRECTORIES(D:/work/wt-3.1.10/build/src/Release 
> D:/work/wt-3.1.10/build/src/http/Release)
> else(WIN32)
>   INCLUDE_DIRECTORIES(/usr/include/Wt)
> endif(WIN32)
> 
> # For FastCGI deployment:
> TARGET_LINK_LIBRARIES(construction.wt ${BACKENDLIB} wt)
> 
> If I use this file for visual studio 2010 project file generation the 
> paths in LINK_DIRECTORIES are not set. What am I doing wrong?
> 
> Thank you, Louis

"The command will apply only to targets created *after* it is called."

(LINK_DIRECTORIES()'s documentation)

Regards,

Michael


More information about the CMake mailing list