If it works, do it.

Custom commands are the easiest way to do MIDL stuff driven by CMake if
you need things to work with any generator.

Alternatively, if you are guaranteed to be using Visual Studio
generators, you can try just adding the idl file as a source file of
the library or executable that contains it, as the VSMidl test does:
[1] -- but it may only work with source/build tree names that contain
no spaces depending on your VS version. The parent CMakeLists that
builds it arranges for this to be the case: [2]

HTH,
David C.

[1]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/VSMidl/src/CMakeLists.txt;h=86c04ed9;hb=029edcdf

[2]
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Tests/VSMidl/CMakeLists.txt;h=432506c3;hb=029edcdf


-- 

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

Reply via email to