Browse Source

CMake: make most of DebugTools dependencies conditional.

MeshTools and Shaders dependencies are needed only if either the Shapes
or SceneGraph library is compiled, Primitives are needed only if the
Shapes library is compiled.
pull/190/head
Vladimír Vondruš 9 years ago
parent
commit
2148cd08aa
  1. 6
      CMakeLists.txt
  2. 13
      src/Magnum/DebugTools/CMakeLists.txt

6
CMakeLists.txt

@ -79,11 +79,11 @@ cmake_dependent_option(WITH_TGAIMPORTER "Build TgaImporter plugin" OFF "NOT WITH
# Parts of the library
cmake_dependent_option(WITH_AUDIO "Build Audio library" OFF "NOT WITH_WAVAUDIOIMPORTER" ON)
option(WITH_DEBUGTOOLS "Build DebugTools library" ON)
cmake_dependent_option(WITH_MESHTOOLS "Build MeshTools library" ON "NOT WITH_DEBUGTOOLS;NOT WITH_OBJIMPORTER" ON)
cmake_dependent_option(WITH_PRIMITIVES "Builf Primitives library" ON "NOT WITH_DEBUGTOOLS" ON)
cmake_dependent_option(WITH_MESHTOOLS "Build MeshTools library" ON "( NOT WITH_DEBUGTOOLS OR ( NOT WITH_SHAPES AND NOT WITH_SCENEGRAPH ) ) AND NOT WITH_OBJIMPORTER" ON)
cmake_dependent_option(WITH_PRIMITIVES "Builf Primitives library" ON "NOT WITH_DEBUGTOOLS OR NOT WITH_SHAPES" ON)
option(WITH_SHAPES "Build Shapes library" ON)
cmake_dependent_option(WITH_SCENEGRAPH "Build SceneGraph library" ON "NOT WITH_SHAPES" ON)
cmake_dependent_option(WITH_SHADERS "Build Shaders library" ON "NOT WITH_DEBUGTOOLS" ON)
cmake_dependent_option(WITH_SHADERS "Build Shaders library" ON "NOT WITH_DEBUGTOOLS OR ( NOT WITH_SHAPES AND NOT WITH_SCENEGRAPH )" ON)
cmake_dependent_option(WITH_TEXT "Build Text library" ON "NOT WITH_MAGNUMFONT;NOT WITH_MAGNUMFONTCONVERTER" ON)
cmake_dependent_option(WITH_TEXTURETOOLS "Build TextureTools library" ON "NOT WITH_TEXT;NOT WITH_DISTANCEFIELDCONVERTER" ON)

13
src/Magnum/DebugTools/CMakeLists.txt

@ -106,16 +106,17 @@ if(BUILD_STATIC_PIC)
set_target_properties(MagnumDebugTools PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
target_link_libraries(MagnumDebugTools
Magnum
MagnumMeshTools
MagnumPrimitives
MagnumShaders)
target_link_libraries(MagnumDebugTools Magnum)
if(WITH_SCENEGRAPH)
target_link_libraries(MagnumDebugTools MagnumSceneGraph)
endif()
if(WITH_SHAPES)
target_link_libraries(MagnumDebugTools MagnumShapes)
target_link_libraries(MagnumDebugTools MagnumShapes MagnumPrimitives)
endif()
if(WITH_SCENEGRAPH OR WITH_SHAPES)
target_link_libraries(MagnumDebugTools
MagnumMeshTools
MagnumShaders)
endif()
install(TARGETS MagnumDebugTools

Loading…
Cancel
Save