[CMake] ExternalProject + PREFIX + CPACK - cannot get the good path

Alfred Sawaya alfred at huji.fr
Tue Jul 18 10:44:49 EDT 2017


>
> May be you can do that with ExternalProject_Add_Step in your own
> CMakeLists.txt ?
>
> Something like (untested):
>
> ExternalProject_Add_Step(sqlcipher package
>     COMMAND "cpack"
>     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
>     COMMENT "Package with cpack"
>     DEPENDEES "install"
>  )
>

It does not work because the install step still tries to install files to
/usr/local/lib and if I set INSTALL_COMMAND at "", CPack will produce an
empty package. So I would still need to play with DESTDIR the same way as
if I use include(CPack).


>
> I don't know much about ExternalProject internals so I may be wrong.
>
> Anyway, the DESTDIR=/tmp make package does the trick for me but I still
>> can implement an integrated solution if it is useful for others ?
>>
>
> As I said this trick is only a way to throw away (in /tmp) the default
> install command which is called by
> make (or make package) as the part of the install step
> of ExternalProject_Add.
>
> --
> Eric
>
-- 
Cordialement,
Alfred Sawaya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170718/d9109ee5/attachment-0001.html>


More information about the CMake mailing list