On 01/26/2015 12:20 PM, Robert Goulet wrote:
> set_source_files_properties(${SHADER_FILE} PROPERTIES COMPILE_FLAGS 
> "/I${CMAKE_SOURCE_DIR}/src")
> and it didn't get written to the .vcxproj file at all.

Right now .hlsl files are written by

 cmVisualStudio10TargetGenerator::WriteExtraSource

because they are (perhaps incorrectly) not classified as
compiled sources.  Look at use of GetObjectSources in
cmVisualStudio10TargetGenerator::WriteAllSources for where
compiled sources get handled.  The OutputSourceSpecificFlags
method handles source-specific COMPILE_FLAGS.

The reason .hlsl files are not classified as compiled sources
is because HLSL is not a first-class language in CMake that
one enables via enable_language().  This also prevents them
from being handled by non-VS generators.  If you are
interested in working on making HLSL a first-class language
I can help you get started.

-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to