[CMake] Small, complete CPack example? re: CPACK_INCLUDE_TOPLEVEL_DIRECTORY
Chris Wolf
cw10025 at gmail.com
Fri Aug 6 16:13:44 EDT 2010
On 8/6/10 12:57 PM, Chris Wolf wrote:
>
>
> On 8/6/10 7:22 AM, Eric Noulard wrote:
>> 2010/8/6 Chris Wolf <cw10025 at gmail.com>:
>>>
>>> e.g for : install(TARGETS usb LIBRARY DESTINATION lib)
>>>
>>> (where project name is "libusb")
>>>
>>> The CPack-generated TGZ archive will contain:
>>> libusb-0.1.1-Darwin/lib/libusb.dylib
>>>
>>> ...this, regardless of the setting of CPACK_INCLUDE_TOPLEVEL_DIRECTORY!
>>>
>>> (I would have expected set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
>>> to result in the archive to contain: ./lib/libusb.dylib)
>>
>> This is the case on my box (Linux Debian Squeeze x86_64),
>> I can strip off the prefix if I do:
>>
>> cpack -D CPACK_INCLUDE_TOPLEVEL_DIRECTORY=0 -G TGZ
>> or
>> if I set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
>
> Ok, invoking cpack directly and overriding on the command line
> works, but overriding in the list file does not work.
>>
>> Which version of CMake are you using on which platform?
>> May be it's a bug.
>
> I downloaded it just two days ago: 2.8.2 on MacOS 10.5 (64 bit OS),
> the file name is "cmake-2.8.2-Darwin-universal.dmg"
Sorry guys, I had my "set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY false)" too low
in the CMakeList.txt - after I put that at the top, it worked. Dumb mistake
on my part.
-Chris
More information about the CMake
mailing list