Skip to content

Commit 9a0778c

Browse files
committed
CMake: Debian packaging improvements
1 parent 6508fd5 commit 9a0778c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

LSLCMake.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,19 @@ macro(LSLGenerateCPackConfig)
317317
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS 1)
318318
set(CPACK_DEB_COMPONENT_INSTALL ON)
319319
set(CPACK_DEBIAN_PACKAGE_PRIORITY optional)
320+
set(CPACK_DEBIAN_LIBLSL_PACKAGE_SHLIBDEPS ON)
321+
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
320322

321323
# include distribution name (e.g. trusty or xenial) in the file name
322324
find_program(LSB_RELEASE lsb_release)
323325
execute_process(COMMAND ${LSB_RELEASE} -cs
324326
OUTPUT_VARIABLE LSB_RELEASE_CODENAME
325327
OUTPUT_STRIP_TRAILING_WHITESPACE
328+
RESULT_VARIABLE LSB_RELEASE_RESULT
326329
)
327-
set(CPACK_DEBIAN_PACKAGE_RELEASE ${LSB_RELEASE_CODENAME})
330+
if(LSB_RELEASE_RESULT)
331+
set(CPACK_DEBIAN_PACKAGE_RELEASE ${LSB_RELEASE_CODENAME})
332+
endif()
328333
set(LSL_OS "Linux${lslplatform}-${LSB_RELEASE_CODENAME}")
329334
endif()
330335
get_cmake_property(CPACK_COMPONENTS_ALL COMPONENTS)
@@ -337,6 +342,7 @@ macro(LSLGenerateCPackConfig)
337342
set("CPACK_COMPONENT_${COMPONENT}_DEPENDS" ${LSLDEPENDS})
338343
endif()
339344

345+
set("CPACK_DEBIAN_${COMPONENT}_PACKAGE_NAME" ${component})
340346
set("CPACK_DEBIAN_${COMPONENT}_FILE_NAME" "${LSL_CPACK_FILENAME}.deb")
341347
set("CPACK_ARCHIVE_${COMPONENT}_FILE_NAME" ${LSL_CPACK_FILENAME})
342348
#set(CPACK_DEBIAN_${component}_FILE_NAME "${FILENAME}.deb")

0 commit comments

Comments
 (0)