Hi, I have a project which is build a library fine with CMake (has around 100 source file).
ADD_LIBRARY ( mylib STATIC a.cpp b.cpp c.cpp <etc> ) The content in b.cpp is relevant to only some platform platform. How do I tell CMake that file b.cpp is only to be include as depends of library "mylib" only if a platform string match. I can achieve the desired effect with IF (WIN32) ADD_LIBRARY ( mylib STATIC a.cpp c.cpp <etc>) ELSE (WIN32) ADD_LIBRARY ( mylib STATIC a.cpp b.cpp c.cpp <etc>) ENDIF (WIN32) As there are hundreds of file, I want to avoid duplicating and add to maintainence. Regards _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake