diff --git a/3rdparty/setup_dependencies.sh b/3rdparty/setup_dependencies.sh index 3eec468..683c960 100755 --- a/3rdparty/setup_dependencies.sh +++ b/3rdparty/setup_dependencies.sh @@ -1,17 +1,4 @@ #!/bin/bash -INITIAL_DIR=$(pwd) - - -# Fetch SDL2 git clone https://github.com/davidsiaw/SDL2.git cd SDL2 git pull -mkdir build -cd build && cmake .. && make -j - -# See https://github.com/davidsiaw/SDL2/blob/master/docs/README-linux.md -# if there are isses with building - - -# Done -cd $INITIAL_DIR diff --git a/CMakeLists.txt b/CMakeLists.txt index 774bfa1..6007a37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,15 @@ else () endif() message(STATUS "Build type: " ${CMAKE_BUILD_TYPE}) +if (BUILD_RT_VISUALIZATION) +## SDL2 +execute_process ( + COMMAND ./setup_dependencies.sh + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/3rdparty +) +add_subdirectory(3rdparty/SDL2) +endif () + ## Defines if (DOUBLE_PRECISION) add_definitions(-DAC_DOUBLE_PRECISION=1)