I was trying to build a project on a seperate drive from the sources.
This works very well for lots of my projects, and so a cmake based
project should work as well.  There is a limitation in cmake using
'command' with working directory....

BASE_BUILD_COMMAND is make_gamedata_arch.bat

add_custom_target(gamedata ALL
        COMMAND ${BASE_BUILD_COMMAND}
                ${BASE_BUILD_DIR}
                ${SEVENZIP_BIN}
        WORKING_DIRECTORY
                "${CMAKE_CURRENT_SOURCE_DIR}/base"
        )

This ends up building a command line that looks like

(On c:)

cd L:\games\spring\cont\base & make_gamedata_arch.bat .......

since the current drive is the C drive, this doesn't change the drive,
it only changes the drive on L:, so you'd have to either
cd L:\games\spring\cont\base & L: & make_gamedata_arch.bat .......
or
cd /D L:\games\spring\cont\base & make_gamedata_arch.bat .......
_______________________________________________
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

Reply via email to