2009/10/4 Wojciech Migda <wojtek.g...@interia.pl>: >> >> You should use CONFIGURE_FILE for that. >> >> Look for example this section of the Wiki: >> http://www.cmake.org/Wiki/CMake_HowToDoPlatformChecks > My personal favourite would be preprocessor macro: > > FIND_PATH(IMAGE_DIR REQUIRED) > > ADD_DEFINITIONS( -DIMAGE_DIR=${IMAGE_DIR} )
Pretty right for a single/simple definition this is very good thank you Wojciech. The difference here is that IMAGE_DIR will be defined for all compiled files. If you want to use the same technique but applied to a single source file you may use set_source_files_properties(<your_particular_sourcefile> PROPERTIES COMPILE_FLAGS "-DIMAGE_DIR=${IMAGE_DIR}") -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ 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