1
0
Fork 0

Fix compatibility with older cmake

This commit is contained in:
Ilya Fedin 2023-05-16 02:55:07 +04:00 committed by John Preston
parent 4eec033889
commit ff81e9562d

View file

@ -11,6 +11,11 @@ function(generate_cppgir target_name gir)
set(gen_timestamp ${gen_dst}/${target_name}_cppgir.timestamp) set(gen_timestamp ${gen_dst}/${target_name}_cppgir.timestamp)
set(gir_path)
if (IS_ABSOLUTE "${gir}")
set(gir_path ${gir})
endif()
add_custom_command( add_custom_command(
OUTPUT OUTPUT
${gen_timestamp} ${gen_timestamp}
@ -28,7 +33,7 @@ function(generate_cppgir target_name gir)
COMMENT "Generating C++ wrapper for ${gir} (${target_name})" COMMENT "Generating C++ wrapper for ${gir} (${target_name})"
DEPENDS DEPENDS
cppgir cppgir
$<$<PATH:IS_ABSOLUTE,${gir}>:${gir}> ${gir_path}
) )
generate_target(${target_name} cppgir ${gen_timestamp} "" ${gen_dst}) generate_target(${target_name} cppgir ${gen_timestamp} "" ${gen_dst})