pretend autogenerated headers are system ones
This commit is contained in:
parent
7f788077d1
commit
a66cb5191a
1 changed files with 6 additions and 2 deletions
|
@ -1,12 +1,12 @@
|
||||||
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-interfaces\")
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-interfaces\")
|
||||||
|
|
||||||
function(geninterface source_h output_h)
|
function(geninterface source_h output_h)
|
||||||
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/${output_h}.xml)
|
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/generated/${output_h}.xml)
|
||||||
qt_generate_dbus_interface( ${source_h} ${xml_file})
|
qt_generate_dbus_interface( ${source_h} ${xml_file})
|
||||||
|
|
||||||
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
|
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
|
||||||
|
|
||||||
qt_add_dbus_interface(libkdeconnect_SRC ${xml_file} ${output_h})
|
qt_add_dbus_interface(libkdeconnect_SRC ${xml_file} generated/${output_h})
|
||||||
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
|
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
@ -66,6 +66,10 @@ set_target_properties(kdeconnectinterfaces PROPERTIES
|
||||||
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# pretend the dbus generated headers are from the system so that clazy and other similar
|
||||||
|
# tools do not show warnings about their contents
|
||||||
|
target_include_directories(kdeconnectinterfaces SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/generated)
|
||||||
|
|
||||||
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
|
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
|
||||||
|
|
||||||
target_link_libraries(kdeconnectinterfaces
|
target_link_libraries(kdeconnectinterfaces
|
||||||
|
|
Loading…
Reference in a new issue