From 6e2dcec59c52ac1c01c44d22cd158259b2a2efa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 13 Jan 2014 15:23:27 +0100 Subject: [PATCH] Platform: better checks for magnum-info compilation. In particular GLX is not available on OS X. --- src/Magnum/Platform/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Magnum/Platform/CMakeLists.txt b/src/Magnum/Platform/CMakeLists.txt index 03e14004c..f660f6a0a 100644 --- a/src/Magnum/Platform/CMakeLists.txt +++ b/src/Magnum/Platform/CMakeLists.txt @@ -177,15 +177,13 @@ endif() # Magnum Info if(WITH_MAGNUMINFO) - if(NOT UNIX AND NOT CORRADE_TARGET_NACL) - message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.") - endif() - add_executable(magnum-info magnum-info.cpp) - if(UNIX AND NOT CORRADE_TARGET_NACL) + if(UNIX AND NOT CORRADE_TARGET_NACL AND NOT APPLE) target_link_libraries(magnum-info MagnumWindowlessGlxApplication ${X11_LIBRARIES}) elseif(CORRADE_TARGET_NACL) target_link_libraries(magnum-info MagnumWindowlessNaClApplication ppapi_cpp ppapi) + else() + message(FATAL_ERROR "magnum-info is not available on this platform. Set WITH_MAGNUMINFO to OFF to skip building it.") endif() target_link_libraries(magnum-info Magnum)