On Wednesday 03 July 2013, Stephen Kelly wrote: > Hi there, > > Given a generic toolchain file like this: > > > set(CMAKE_SYSTEM_NAME Linux) > > set(CMAKE_C_COMPILER "arm-linux-gnueabihf-gcc") > set(CMAKE_CXX_COMPILER "arm-linux-gnueabihf-g++") > > set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) > set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) > set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) > > > I can invoke cmake like this: > > cmake .. -DCMAKE_TOOLCHAIN_FILE=../ArmToolchain.cmake \ > -DCMAKE_SYSROOT=/home/stephen/rpi/rasp-pi-rootfs/ \ > -DCMAKE_MAKE_PROGRAM=/usr/bin/make \ > -DCMAKE_INSTALL_PREFIX=/opt/myproject > > > Question: Should the installation be to > > /opt/myproject > > on the host, or to > > /home/stephen/rpi/rasp-pi-rootfs/opt/myproject > > on the host? > > For the Qt configure, the answer is the latter, and I think it makes sense. > As CMAKE_SYSROOT is new, we can still change the behavior to that. I tend > to think we should.
Not quite sure. I tend to agree. Different question: is CMAKE_FIND_ROOT_PATH actually still necessary ? With a combination of CMAKE_SYSROOT and CMAKE_PREFIX_PATH most cases should be handled already. > However, that leaves the question of how to install outside the sysroot. An > option would be something like a new CMAKE_HOST_INSTALL_PREFIX: > > cmake .. -DCMAKE_TOOLCHAIN_FILE=../ArmToolchain.cmake \ > -DCMAKE_SYSROOT=/home/stephen/rpi/rasp-pi-rootfs/ \ > -DCMAKE_MAKE_PROGRAM=/usr/bin/make \ > -DCMAKE_HOST_INSTALL_PREFIX=/opt/myproject > > which installs to > > /opt/myproject > > on the host. Then there would be two different install prefixes. Which would be used when ? Alex -- 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers