CMake:Android: pass absolute paths to add_jar()
This would make paths in warning/error messages absolute also, being more clear which module it is from and another benefit is it being clickable from various IDEs in case the qt5 repo is opened as a project and not only single modules. Change-Id: Ic95cea0005f0675186ad700e197e217dad016876 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
f167150a66
commit
edd29f7624
@ -22,7 +22,14 @@ function(qt_internal_add_jar target)
|
||||
set(CMAKE_JAVA_COMPILE_FLAGS -source "${javac_source_version}" -target "${javac_target_version}"
|
||||
-Xlint:all -classpath "${QT_ANDROID_JAR}"
|
||||
)
|
||||
add_jar(${ARGV})
|
||||
|
||||
set(absolute_sources "")
|
||||
foreach(path IN LISTS arg_SOURCES)
|
||||
get_filename_component(absolute_path "${path}" ABSOLUTE)
|
||||
list(APPEND absolute_sources "${absolute_path}")
|
||||
endforeach()
|
||||
|
||||
add_jar(${target} SOURCES ${absolute_sources} ${ARGV})
|
||||
|
||||
foreach(f IN LISTS arg_SOURCES)
|
||||
_qt_internal_expose_source_file_to_ide(${target} "${f}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user