[CMake] LINK_DIRECTORIES visual studio 2010

Louis Hoefler louis.hoefler at gmx.de
Fri Jul 29 11:33:25 EDT 2011


Ah, yes this one works:
cmake_minimum_required(VERSION 2.8)

IF(DEFINED USEFCGI)
  SET(BACKENDLIB wtfcgi)
ELSE(DEFINED USEFCGI)
  SET(BACKENDLIB wthttp)
ENDIF(DEFINED USEFCGI)

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)

ADD_EXECUTABLE(construction.wt
  construction.cpp
)

TARGET_LINK_LIBRARIES(construction.wt wt ${BACKENDLIB})

Moved the ADD_EXECUTABLE below the LINK_DIRECTORIES.

Thank you, Louis

Am 29.07.2011 17:32, schrieb Michael Hertling:
> "The command will apply only to targets created *after* it is called."
>
> (LINK_DIRECTORIES()'s documentation)
>
> Regards,
>
> Michael
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: 
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110729/17007b0c/attachment.htm>


More information about the CMake mailing list