[CMake] How can I avoid the addition of Debug/Release to the link
path?
KSpam
keesling_spam at cox.net
Tue Oct 9 11:37:53 EDT 2007
This was an annoyance I had with Visual Studio as well, and I was able to work
around it fairly easily. I have CMAKE_CONFIGURATION_TYPES set when I am
building in Visual Studio. I expect that this would be similar for Xcode.
All I do is prepend "../" to the output name, and I set the OUTPUT_NAME with
SET_TARGET_PROPERTIES.
SET(outputName "")
IF (CMAKE_CONFIGURATION_TYPES)
SET(outputName "../${name}")
ELSE (CMAKE_CONFIGURATION_TYPES)
SET(outputName ${name})
ENDIF (CMAKE_CONFIGURATION_TYPES)
SET_TARGET_PROPERTIES(${targetName} PROPERTIES OUTPUT_NAME ${outputName})
Perhaps this will work for you as well.
Justin
On Monday 08 October 2007 21:42:31 Nico Galoppo wrote:
> Hi,
>
> I add required libraries to my project with
>
> TARGET_LINK_LIBRARIES(target /path/to/library)
>
> I then generate Xcode projects, but they give me a warning that
> /path/to/Debug (or /path/to/Release) doesn't exist in the linker flag
> -L/path/to/{Debug,Release} (and fail because there are alongside
> libraries being pulled it). Apparently, cmake added the linker flag
> -L/path/to/Debug with the above macro, where I'd like it to add
> -L/path/to instead. Is there a way to do this? Perhaps with
> LINK_DIRECTORIES()?
>
> Thanks.
More information about the CMake
mailing list