[CMake] Creating an installer using cpack

Gonzalo Garramuno ggarra13 at gmail.com
Thu Jan 8 15:46:50 EST 2015


I have a cmake file to build my project (mrViewer).  The project has 
additional script files that are not mentioned in my cmake file.
The project also has dependencies on c libraries installed elsewhere 
(/usr/local, etc).

The tgz,deb and rpm files currently contain just the main executable 
after a:

ADD_EXECUTABLE( mrViewer WIN32 ${SOURCES} )
TARGET_LINK_LIBRARIES( mrViewer ${LIBRARIES} )

INSTALL( TARGETS mrViewer
   RUNTIME DESTINATION bin
   LIBRARY DESTINATION lib
)

What I would like to have is a cmake sample file that shows how to:

a) Install the script files respecting its local location.
b) Install the c libraries in a local lib directory.

for cpack packaging.

Thank you very much in advance,

Gonzalo


More information about the CMake mailing list