[CMake] Cpack not packaging anything
Thomas Nilsson
thomas.nilsson at responsive.se
Mon Nov 26 12:42:32 EST 2012
Eric Noulard skrev 2012-11-26 17:22:
> 2012/11/26 Thomas Nilsson <thomas.nilsson at responsive.se>:
>> Found this: http://www.cmake.org/pipermail/cmake/2008-July/022958.html
>>
>> CPack can't handle absolute install paths (like /usr/local/include) unless
>> CPACK_SET_DESTDIR is set, then it installs in the specified location and
>> picks the files from there. Normal behaviour is to install in a temporary
>> location by modifying the CMAKE_INSTALL_PREFIX and fetching them from there.
> This is not entirely true, CPack RPM and DEB may automatically handle
> absolute install path.
I didn't make myself clear. My exploration only refers to TGZ-packaging,
so far. Sorry.
>> What's CPack's thought model for installing a package of headers and
>> libraries from a TGZ on Unixen? That the files should go in a separate a
>> package directory? Because that might match Windows/Macosx install models,
>> but not Unix where they normally go in a standardized location that is
>> already in the appropriate search paths.... Anyway to achieve this?
> I don't quite understand what you said.
Sorry. Written in haste... and without thinking.
> You may install your include in a **relative** DESTINATION include
> then install binaries in a **relative** DESTINATION bin
> then you get the appropriate unix separation without requiring
> absolute install path?
What I meant to say was that typical installs on Unix/Linux is
- headers in /usr/local/include or possibly
/usr/local/include/<package>
- libraries in /usr/local/lib
- executables in /usr/local/bin
where "/usr/local" might also be "/opt" or something similar. There is
no "Package"-prefix there, like it might be for Windows or MacOSX
applications. But of course the install prefix is then "/usr/local". So
sorry for my lapse in thinking.
But my real problem is then that I can't get CPack to work without
CPACK_SET_DESTDIR.
My (inherited) CMakeList.txt:s does specify
set(CMAKE_INSTALL_PREFIX /usr/local)
but also things like
install(... DESTINATION ${BIN_INSTALL_DIR} ...)
set(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin)
set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
I am starting to suspect that the expansion of this binds all install
targets to the absolute path in CMAKE_INSTALL_PREFIX. And that it
instead should be something like
install(... DESTINATION ${BIN_INSTALL_DIR} ...)
set(BIN_INSTALL_DIR bin)
I'll make an empirical investigation...
/Thomas
> If ever bin and include do not share the same prefix then you may create
> component package and unpack those at appropriate prefix.
>
> By the way using absolute install path on Windows just does not work or
> sometimes produces unexpected (and probably unwanted) behavior.
> CMake 2.8.8 (or 9 I'm unsure) and up should warn you about that.
>
> May be you could give us some example of use of absolute install path
> and your expected behavior so that we can speak on concrete exemple?
>
> Most (if not all) of the time using absolute install paht is NOT necessary
> to obtain what you want.
>
>
>> /Thomas
>>
>> 26 nov 2012 kl. 16:08 skrev David Cole <david.cole at kitware.com>:
>>
>> Run:
>>
>> VERBOSE=1 make package
>>
>> Then, run the same command line that it runs for CPack, but add the
>> "--debug" and "--verbose" flags to see if that tells you what's going
>> wrong...
>>
>>
>> HTH,
>> David
>>
>>
>> On Mon, Nov 26, 2012 at 10:01 AM, Thomas Nilsson
>> <thomas.nilsson at responsive.se> wrote:
>>
>> I have a project with multiple subdirectories and installs. I'm trying to
>> get it to package the targets using CPack, but nothing gets included in the
>> .tgz when I "make package". There is an install_manifest.txt generated which
>> lists the correct files, but the .tgz is empty. So it seems that CPack finds
>> the correct targets.
>>
>> Where should I start looking?
>>
>> /Thomas
>> --
>>
>> 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
>>
>>
>>
>> --
>>
>> 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
>
>
More information about the CMake
mailing list