I have created a CMake custom command that I use to invoke a pre-existing executable. Unfortunately, this executable also needs a custom environment variable in order to function correctly. Is there any way to set and pass on this environment variable to the executable in CMakeLists.txt, *on Windows*?
On Linux, it is simple: I can just say something like: COMMAND FOO_DIR=${CMAKE_SOURCE_DIR}/data /usr/local/bin/foo and that works perfectly. On Windows, I am at a loss as to how I can achieve the same effect, other than creating a .bat wrapper file that sets the environment variable outside of CMake -- and I'd like to avoid that if at all possible. Am I overlooking something? -- Leo Breebaart <l...@lspace.org> _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake