From 5cd68753d37285e7ef86eafebd1a3d2c7669ece2 Mon Sep 17 00:00:00 2001 From: Raphael Coeffic Date: Thu, 5 Aug 2021 09:18:27 +0200 Subject: [PATCH] Do not add parameters to a target not defined (if QT was not detected) --- radio/src/targets/simu/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radio/src/targets/simu/CMakeLists.txt b/radio/src/targets/simu/CMakeLists.txt index 886f42833..9da980ba7 100644 --- a/radio/src/targets/simu/CMakeLists.txt +++ b/radio/src/targets/simu/CMakeLists.txt @@ -71,7 +71,9 @@ endif() if(WIN32) include_directories(SYSTEM ${WIN_INCLUDE_DIRS}) - target_link_libraries(${SIMULATOR_TARGET} PRIVATE ${WIN_LINK_LIBRARIES}) + if(Qt5Widgets_FOUND) + target_link_libraries(${SIMULATOR_TARGET} PRIVATE ${WIN_LINK_LIBRARIES}) + endif() endif(WIN32) if(MSVC)