I have a CMake project that installs things to a system according to the install
command as follows:
install (
TARGETS myTarget
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
)
make install
works perfectly. And then I want to have a binary archive:
set(CPACK_GENERATOR "TGZ")
make package
produces an tar.gz file with the same folder structure as the install
command specified. However, I want to have a flat structure, that is, put everything (both executables and libraries) in "prefix", without the "bin" and "lib" directory.
Is that possible? May be with some clever use of the component system, the build type system, or CPACK_PROJECT_CONFIG_FILE
?