Commit 4d4e5b58 authored by Aaron Bray's avatar Aaron Bray

Skip superbuild if all dependencies are met

parent 72265644
include(ExternalProject)
project(ExplorerSuperBuild)
if(MSVC OR XCode)
# For multi configuration IDE environments start with release
set(CMAKE_CONFIGURATION_TYPES Release CACHE TYPE INTERNAL FORCE )
endif()
set(DEPENDENCIES)
set( Qt5_DIR "" CACHE PATH "Path to Qt" )
......@@ -97,6 +92,19 @@ if(NOT Pulse_FOUND)
list(APPEND DEPENDENCIES "Pulse")
endif()
find_package(Qt5 COMPONENTS Core Widgets Charts REQUIRED)
# Let's see if we have everything we need and the Superbuild is not necessary
if(NOT DEPENDENCIES)
set(DOING_SUPERBUILD FALSE)
return()
endif()
set(DOING_SUPERBUILD TRUE)
if(MSVC OR XCode)
# For multi configuration IDE environments start with release
set(CMAKE_CONFIGURATION_TYPES Release CACHE TYPE INTERNAL FORCE )
endif()
ExternalProject_Add(PulseExplorer
PREFIX PulseExplorer
DEPENDS ${DEPENDENCIES}
......
......@@ -10,9 +10,14 @@ endif()
# Superbuild stuff
option(DO_SUPERBUILD "Download and build any project dependencies" ON)
option(USE_PARAVIEW "Include the ParaView Model Window" OFF)
if (DO_SUPERBUILD)
include("CMake/Superbuild.cmake")
return()
include("CMake/Superbuild.cmake")
if(DOING_SUPERBUILD)
return()
else()
message(STATUS "All dependencies found, skipping superbuild")
endif()
endif()
# Policy to address @foo@ variable expansion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment