[CMake] CMAKE_INSTALL_PREFIX problem

Petr Kmoch petr.kmoch at gmail.com
Wed Sep 24 02:39:49 EDT 2014


Hi Jeremy.

Does ${BUILD_BIN} perhaps start with a slash? If so, it would be
interpreted as an absolute path, which of course ignores
CMAKE_INSTALL_PREFIX.

Petr

On Wed, Sep 24, 2014 at 7:58 AM, Jeremy Ardley <jeremy.ardley at gmail.com>
wrote:

>  I am using cmake 2.8.9 on debian wheezy. I'm fairly new to using cmake.
>
> My CMakelists.txt file starts with
>
> cmake_minimum_required(VERSION 2.6)
> SET(CMAKE_INSTALL_PREFIX /home/jeremy/Projects/local/)
> project(myproject)
>
> ....
>
> Finishing with
>
> INSTALL ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/@APPLICATION_NAME@ DESTINATION @${BUILD_BIN} )
>
> which installs in my target directory, but under a tree prefixed by the
> '@' character. i.e. /home/jeremy/Projects/local/@/sbin and equivalent.
>
> I'm guessing that this is a result of the fragment
>
> @${BUILD_BIN}
>
> The problem is that if I remove the '@' the INSTALL ignores the
> CMAKE_INSTALL_PREFIX
>
> I've experimented with different variations on the INSTALL lines to no
> success.
>
> Any advice on how to get my INSTALLS ending up in
> /home/jeremy/Projects/local/sbin and equivalent?
>
> Thanks
>
> --
>  Jeremy Ardley
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140924/0fe40832/attachment.html>


More information about the CMake mailing list