<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-western">Hi everyone,
<br>
I'm trying to configure CPack for packaging an executable and some
shared libraries the application depends on. Both application and
libraries are built by CMake. For NSIS, this works just fine, the
installer includes all necessary files. However, the CPack Debian
generator seems to only include the executable in the package, but
not the shared libraries. Unfortunately, static linking is not an
option due to licensing issues.
<br>
<br>
I've put some excerpts of the CMakeLists.txt files and CPack
configuration below.
<br>
<br>
Some observations:
<br>
- Adding another executable target to the package works fine, only
library targets are affected
<br>
- Miscellaneous files installed with INSTALL(FILES ...)
are properly included in the debian package<br>
- "make install" installs the shared libraries, as it should
<br>
- As mentioned above, (almost) the same configuration works fine
for the CPack NSIS generator<br>
- playing around with the DESTINATION arguments of the libraries'
install commands didn't help
<br>
<br>
Am I missing something obvious? Doesn't the CPack .deb generator
support packaging of pre-compiled libraries?
<br>
<br>
Thanks for any help,
<br>
Ben
<br>
<br>
###############################################################
<br>
# CMakeLists.txt and CPack configuration file in excerpts
<br>
###############################################################
<br>
<br>
# One of the libraries
<br>
add_library(gdcp SHARED ${SOURCES} ${PUBLIC_HEADERS}
${PRIVATE_HEADERS} )
<br>
<br>
install(
<br>
TARGETS gdcp
<br>
LIBRARY DESTINATION lib
<br>
RUNTIME DESTINATION bin
<br>
COMPONENT gdcp_lib
<br>
)
<br>
<br>
# The executable
<br>
add_executable(gdcp_browser
<br>
${SOURCES}
<br>
${HEADERS}<br>
)
<br>
<br>
install(
<br>
TARGETS gdcp_browser
<br>
RUNTIME DESTINATION bin
<br>
COMPONENT gdcp_browser
<br>
)
<br>
<br>
And part of the CPack configuration file I use for the Debian
package:
<br>
<br>
SET(CPACK_CMAKE_GENERATOR "Unix Makefiles")
<br>
SET(CPACK_GENERATOR "DEB")
<br>
SET(CPACK_INSTALL_CMAKE_PROJECTS
<br>
"@CMAKE_BINARY_DIR@;gdcp;gdcp_browser;/"
<br>
"@CMAKE_BINARY_DIR@;gdcp;gdcp_lib;/"
<br>
)
<br>
...
<br>
</div>
</body>
</html>