Hello I'm trying to generate source files .cxx and include them in ADD_LIBRARY to build a static library, according to http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_ the_build.3F
# # Copy template source files to *.cxx and place them in the build dir # ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_name.cpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx COMMAND ${CMAKE_COMMAND} copy ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx DEPENDS ${CMAKE_SOURCE_DIR}/template_name.cpp ${CMAKE_SOURCE_DIR}/systems/template_widget.cpp ) ADD_LIBRARY(mylib STATIC main.cpp parameters.hpp ${CMAKE_CURRENT_BINARY_DIR}/name.cxx ${CMAKE_CURRENT_BINARY_DIR}/widget.cxx ) The vs2008 solution is generated with the Solution explorer showing the .cxx files, but they are actually nowhere to be found. Regards, _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake