build: set OS_ID_LIKE only if unset

cmake MATCHES directive with the empty regex "" always match, including
non-empty strings.

Type: fix
Fixes: 534dfc1f18

Change-Id: If085b29da15a6d7fc680cebb823183fd3c7eea68
Signed-off-by: Benoît Ganne <bganne@cisco.com>
This commit is contained in:
Benoît Ganne
2022-08-31 11:45:17 +02:00
committed by Andrew Yourtchenko
parent 1363331f0f
commit 934f9b095f

View File

@ -65,7 +65,7 @@ macro(add_vpp_packaging)
set(CPACK_${type}_PACKAGE_RELEASE 1)
# Pure Debian does not set the "OS_ID_LIKE", it only sets "OS_ID"
if (OS_ID_LIKE MATCHES "")
if (NOT DEFINED OS_ID_LIKE)
set(OS_ID_LIKE "${OS_ID}")
endif()