From 9297cd74ab2558754c390465069dd4cb6e16680b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 9 Sep 2022 20:25:02 +0200 Subject: [PATCH] Platform: add helpful error messages to application test build files. --- src/Magnum/Platform/Test/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Magnum/Platform/Test/CMakeLists.txt b/src/Magnum/Platform/Test/CMakeLists.txt index 0bb325f49..8e86d26ed 100644 --- a/src/Magnum/Platform/Test/CMakeLists.txt +++ b/src/Magnum/Platform/Test/CMakeLists.txt @@ -85,6 +85,9 @@ if(MAGNUM_WITH_GLFWAPPLICATION) # HiDPi.manifest not needed, as GLFW sets that on its own target_link_libraries(PlatformGlfwApplicationTest PRIVATE MagnumGlfwApplication Corrade::Main) # Window icon loading + if(NOT MAGNUM_WITH_TRADE) + message(FATAL_ERROR "GlfwApplication tests need the Trade library enabled") + endif() target_sources(PlatformGlfwApplicationTest PRIVATE ${Platform_RESOURCES}) target_link_libraries(PlatformGlfwApplicationTest PRIVATE MagnumTrade) if(CORRADE_TARGET_APPLE) @@ -112,6 +115,9 @@ if(MAGNUM_WITH_SDL2APPLICATION) endif() target_link_libraries(PlatformSdl2ApplicationTest PRIVATE MagnumSdl2Application Corrade::Main) # Window icon loading + if(NOT MAGNUM_WITH_TRADE) + message(FATAL_ERROR "GlfwApplication tests need the Trade library enabled") + endif() if(NOT CORRADE_TARGET_EMSCRIPTEN) target_sources(PlatformSdl2ApplicationTest PRIVATE ${Platform_RESOURCES}) target_link_libraries(PlatformSdl2ApplicationTest PRIVATE MagnumTrade)