[CMake] Windows library target names

Ryan Pavlik rpavlik at iastate.edu
Thu Jul 22 16:32:38 EDT 2010


  On 7/22/2010 3:23 PM, Olaf van der Spek wrote:
> On Thu, Jul 22, 2010 at 9:23 PM, Ryan Pavlik<rpavlik at iastate.edu>  wrote:
>>   On 7/22/10 10:08 AM, Olaf van der Spek wrote:
>>> Hi,
>>>
>>> All target names have the same base name. So both the debug and
>>> release variant are called xbt.lib. However, I've only got a single
>>> lib dir. Shouldn't all variants have a unique name?
>>>
>>> Olaf
>> set(CMAKE_DEBUG_POSTFIX _d)
> Shouldn't this be done automatically?
> What about shared vs static lib?
> Shared vs static runtime?
> x64 vs x86?
>
> Olaf

Unfortunately there are as many ways to denote these differences as 
there are projects. However, unless you're setting the 
ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, or 
RUNTIME_OUTPUT_DIRECTORY (and if you are, I highly suggest not doing so 
and instead installing as-needed to a local prefix), the files should 
not collide in the build tree - in a multi-config generator like MSVC, 
each target gets a directory for each build type, and in a single-config 
generator you'll only have one build type per entire build tree.

Ryan

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik



More information about the CMake mailing list