[CMake] CMake/Visual Studio projects: add files that should not be compiled

Jan Woetzel jw at mip.informatik.uni-kiel.de
Thu Oct 20 11:27:21 EDT 2005


Hi,
how can I add files to Visual studio projects that should not be compiled
but are listed in the project for easier editing ?

E.g.
(1) ".cg" files (programmable shaders, not C/C++ code)

I tried:

SET(GPU_SHADER foo.cg bar.cg)
IF(VISUAL_IDE)
  ADD_LIBRARY(Shader        ${GPU_SHADER} )
  SOURCE_GROUP(Shader FILES ${GPU_SHADER} )
ENDIF(VISUAL_IDE)

This makes the files appear in a separate group - but the target belongs 
to ALL_BUILD...

The VISUAL_IDE part works correctly using
IF(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")

Any idea?
Jan

-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel
  Institute of Computer Science and Applied Mathematics
  Hermann-Rodewald-Str. 3 [room 310]
  24098 Kiel/Germany
--------------------------------------------------
  Phone +49-431-880-4477
  Fax   +49-431-880-4054
  Mob.  +49-179-2937346
--------------------------------------------------
  Url   www.mip.informatik.uni-kiel.de/~jw
  Email jw at mip.informatik.uni-kiel.de



More information about the CMake mailing list