[CMake] Adding "*.obj" geometry files...

Daniel Dekkers d.dekkers at cthrough.nl
Tue Jun 19 16:27:56 EDT 2012


Hi Brad, 

Thanks for trying...

This would be a minimal example:

CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(HeaderOnlyTest)
SET(SOURCE_FILE main.c)
SET(RESOURCE_FILE test.xml)
SET_SOURCE_FILES_PROPERTIES(${RESOURCE_FILE} PROPERTIES HEADER_FILE_ONLY
TRUE) 
ADD_EXECUTABLE(HeaderOnlyTest ${SOURCE_FILE} ${RESOURCE_FILE})
SET_TARGET_PROPERTIES(HeaderOnlyTest PROPERTIES RESOURCE "${RESOURCE_FILE}")

main.c:

#include <stdio.h>

int main(void)
{
	printf("Hello World\n");
	return 0;
}

test.xml:

<Whatever></Whatever>

With the VS2008 generator, test.xml is excluded. 
With the VS2010 generator, test.xml is included.

I'm using CMake nightly build 2.8.8.20120618
Visual Studio 2008 Version 9.0.30729.1 SP
Visual Studio 2010 Version 10.0.40219.1 SP1Rel

Thanks,
Daniel

-----Oorspronkelijk bericht-----
Van: Brad King [mailto:brad.king at kitware.com] 
Verzonden: dinsdag 19 juni 2012 19:24
Aan: Daniel Dekkers
CC: 'j'; cmake at cmake.org; 'Bill Hoffman'
Onderwerp: Re: [CMake] Adding "*.obj" geometry files...

On 06/19/2012 11:28 AM, Daniel Dekkers wrote:
> We were already using 2.8.8. We tried the nightly build but still no
effect.
> It's not just the obj files, it's xml, ttf, png, ...
> The VS2008 generator works fine, with the nightly build as well, but 
> VS2010,.. no excludes.

I just tried 2.8.8 and it works fine for me.  Please provide a minimal
source tarball with CMakeLists.txt and source files that reproduces the
problem.  Also specify the exact output of "cmake --version" and the exact
command line you use to run it.

-Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HeaderOnlyTest.zip
Type: application/x-zip-compressed
Size: 936 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120619/10770cfd/attachment.bin>


More information about the CMake mailing list