[Cmake] How to do configuration specific options in the MS Visual
Studio Projects
Aleksey Sanin
aleksey at coral8.com
Mon Jun 28 11:29:02 EDT 2004
Brad,
Thank you very much! This trick works just fine!
Best,
Aleksey
>
> There is no explicit support for something like this in the current
> Visual Studio generators. You can try something like this (untested):
>
> IF(CMAKE_GENERATOR MATCHES "Visual Studio")
> TARGET_LINK_LIBRARIES(mytarget /path/to/$(IntDir)/libabc.lib)
> ELSE(CMAKE_GENERATOR MATCHES "Visual Studio")
> # Do something else to link the library.
> ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio")
>
> The "$(IntDir)" should be parens, not curlys. It will be passed by
> CMake through to the generated project file and Visual Studio will
> evaluate "$(IntDir)" to "Debug" or "Release" at build time.
More information about the Cmake
mailing list