[CMake] Visual Studio 2010 generator broke? Yes, but not how I thought

J Decker d3ck0r at gmail.com
Sun Sep 26 11:40:36 EDT 2010


this is the sample cmakelists that causes bad output...

--------------

cmake_minimum_required(VERSION 2.8)

project( launchpad )
set(BASE_SOURCES launchpad.c launchpad.rc )
add_executable(${PROJECT_NAME} WIN32 ${BASE_SOURCES} )

-------------

the 'Output File Name' property in visual studio is ...
      <ObjectFileName>$(Configuration)/launchpad.c.obj</ObjectFileName>
Normally this is just $(IntDir)

but some reason because I have a resource and a source file the same
name the output file is different?

and even if it was... it should still be $(IntDir)/launchpad.c.obj  (
I guess so I can have launchpad.c.obj and launchpad.cpp.obj and
launchpad.rc.obj ?)


Also if I have another project like...
-----
project( launchpad2 )
set(BASE_SOURCES launchpad.c ) # no resources
add_executable(${PROJECT_NAME} WIN32 ${BASE_SOURCES} )
-----

the output file of this also becomes $((Configuration)/launchpad.c.obj


More information about the CMake mailing list