1
0
Fork 0

Update cppgir to the namespaced targets

This commit is contained in:
Ilya Fedin 2023-08-04 19:00:52 +04:00 committed by John Preston
parent d1c98b4c47
commit 8714461f77
2 changed files with 5 additions and 5 deletions

@ -1 +1 @@
Subproject commit 82fd18518cea24eeba8dcbe3909c72498935457c
Subproject commit ef6d50ababb13ab7c9a13cc46d3500d6e02a98f2

View file

@ -20,7 +20,7 @@ function(generate_cppgir target_name gir)
OUTPUT
${gen_timestamp}
COMMAND
cppgir
CppGir::cppgir
--debug
1
--class
@ -35,17 +35,17 @@ function(generate_cppgir target_name gir)
echo 1> ${gen_timestamp}
COMMENT "Generating C++ wrapper for ${gir} (${target_name})"
DEPENDS
cppgir
CppGir::cppgir
${gir_path}
)
generate_target(${target_name} cppgir ${gen_timestamp} "" ${gen_dst})
get_target_property(target_type ${target_name} TYPE)
if (${target_type} STREQUAL "INTERFACE_LIBRARY")
target_link_libraries(${target_name} INTERFACE gi)
target_link_libraries(${target_name} INTERFACE CppGir::gi)
target_compile_definitions(${target_name} INTERFACE GI_INLINE GI_OBJECT_NEWV)
else()
target_link_libraries(${target_name} PUBLIC gi)
target_link_libraries(${target_name} PUBLIC CppGir::gi)
target_compile_definitions(${target_name} PUBLIC GI_INLINE GI_OBJECT_NEWV)
endif()
endfunction()