mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mavsdk_tests: check installed version
Starting with MAVSDK 0.39.0 we can specify the version required. This way we can fail at configure time instead of later during compilation or linking.
This commit is contained in:
parent
14e51098e5
commit
43fccece61
@ -6,7 +6,10 @@ set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
find_package(MAVSDK REQUIRED)
|
||||
file(READ MAVSDK_VERSION MAVSDK_VERSION)
|
||||
string(STRIP ${MAVSDK_VERSION} MAVSDK_VERSION)
|
||||
|
||||
find_package(MAVSDK "${MAVSDK_VERSION}" REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
if(MAVSDK_FOUND)
|
||||
|
||||
@ -1 +1 @@
|
||||
0.38.0
|
||||
0.39.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user