We have a project that gets built on a variety of platforms, but it mostly
boils down to "windows" and "not windows".  For our libraries to build on
Windows, we need to also specify a .def and a .rc file in the library
source files list.  We have a strategy for adding these in using an extra
platform specific variable that's working fine.

However, cmake seems to be so good at sorting out differences like this
that I was wondering if I might be missing an easier strategy of dealing
with these extra requirements.  I tried adding those files to the list
unconditionally in the hope that cmake would figure out that these files
were a Windows-only thing and ignore them, but that didn't really work.  Is
there some easier way to do this?  What we have is working well, but I'm
always looking for ways to reduce the number of conditional tests we
require in the build script.

Rick
-- 

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