diff --git a/.gitmodules b/.gitmodules index 9fb458a34..d1afc51aa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,3 +19,8 @@ [submodule "assetnameparser/tinyxml2"] path = assetnameparser/tinyxml2 url = ../tinyxml2.git +[submodule "hecl-gui"] + + path = hecl-gui + + url = ../hecl-gui diff --git a/CMakeLists.txt b/CMakeLists.txt index c3573bbf6..20dfaa54a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,6 +139,20 @@ add_subdirectory(mpcksum) add_subdirectory(gbalink) add_subdirectory(visigen) +# Test for supported Qt version +find_program(QMAKE_EXECUTABLE NAMES qmake HINTS ${QTDIR} ENV QTDIR PATH_SUFFIXES bin) +if (QMAKE_EXECUTABLE) + set(QT_MINIMUM_VERSION 5.3.0) + execute_process(COMMAND ${QMAKE_EXECUTABLE} -query QT_VERSION OUTPUT_VARIABLE QT_VERSION) + if(QT_VERSION LESS QT_MINIMUM_VERSION) + message("Qt version ${QT_VERSION} does not meet the minimum ${QT_MINIMUM_VERSION} requirement, hecl-gui will not be built") + else() + message("hecl-gui will be built with Qt verion ${QT_VERSION}") + add_subdirectory(hecl-gui) + endif() +else() + message("Qt not found, hecl-gui will not be built") +endif() unset(GIT_EXECUTABLE CACHE) find_package(Git) if(GIT_FOUND) diff --git a/hecl-gui b/hecl-gui new file mode 160000 index 000000000..2113bed95 --- /dev/null +++ b/hecl-gui @@ -0,0 +1 @@ +Subproject commit 2113bed95f80fea497e56deec12ea5364b858a3f