Browse Source

Handle WITH_* options for utilities better.

I.e., don't offer them on platforms which don't support them.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
fa90558727
  1. 10
      CMakeLists.txt
  2. 2
      src/Platform/CMakeLists.txt

10
CMakeLists.txt

@ -48,8 +48,6 @@ cmake_dependent_option(WITH_SHADERS "Build Shaders library" ON "NOT WITH_DEBUGTO
cmake_dependent_option(WITH_SHAPES "Build Shapes library" ON "NOT WITH_DEBUGTOOLS" ON)
option(WITH_TEXT "Build Text library" ON)
cmake_dependent_option(WITH_TEXTURETOOLS "Build TextureTools library" ON "NOT WITH_TEXT;NOT WITH_DISTANCEFIELDCONVERTER" ON)
option(WITH_MAGNUMINFO "Build magnum-info utility" OFF)
cmake_dependent_option(WITH_DISTANCEFIELDCONVERTER "Build magnum-distancefield utility" OFF "NOT TARGET_GLES" OFF)
# Application libraries
if(CORRADE_TARGET_NACL)
@ -63,6 +61,14 @@ else()
option(WITH_SDL2APPLICATION "Build Sdl2Application library" OFF)
endif()
# Utilities (currently depending on WindowlessGlxApplication)
if(UNIX OR CORRADE_TARGET_NACL)
option(WITH_MAGNUMINFO "Build magnum-info utility" OFF)
endif()
if(UNIX)
cmake_dependent_option(WITH_DISTANCEFIELDCONVERTER "Build magnum-distancefieldconverter utility" OFF "NOT TARGET_GLES" OFF)
endif()
# Plugins
cmake_dependent_option(WITH_MAGNUMFONT "Build MagnumFont plugin" OFF "WITH_TEXT" OFF)
cmake_dependent_option(WITH_MAGNUMFONTCONVERTER "Build MagnumFontConverter plugin" OFF "NOT MAGNUM_TARGET_GLES;WITH_TEXT" OFF)

2
src/Platform/CMakeLists.txt

@ -178,7 +178,7 @@ 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 suppress this warning.")
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)

Loading…
Cancel
Save