diff --git a/CMakeLists.txt b/CMakeLists.txt index 720c516..b16295a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,11 +22,15 @@ set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS ON) -set(BUILD_STATIC ON CACHE BOOL "" FORCE) -set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE) -set(WITH_PLUGINMANAGER OFF CACHE BOOL "" FORCE) -set(WITH_TESTSUITE OFF CACHE BOOL "" FORCE) -add_subdirectory(corrade) +option(USE_CORRADE_SUBMODULE "Use Corrade from the Git submodule. If set to OFF, make sure you have Corrade 2020.06 or later installed to a path CMake can search in." ON) + +if(NOT USE_CORRADE_SUBMODULE) + set(BUILD_STATIC ON CACHE BOOL "" FORCE) + set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE) + set(WITH_PLUGINMANAGER OFF CACHE BOOL "" FORCE) + set(WITH_TESTSUITE OFF CACHE BOOL "" FORCE) + add_subdirectory(corrade EXCLUDE_FROM_ALL) +endif() find_package(Corrade REQUIRED Containers Utility) diff --git a/MassBuilderManager/MassBuilderManager.cpp b/MassBuilderManager/MassBuilderManager.cpp index 627904e..dc1be5f 100644 --- a/MassBuilderManager/MassBuilderManager.cpp +++ b/MassBuilderManager/MassBuilderManager.cpp @@ -14,6 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include + +#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006) + #error This application requires Corrade 2020.06 or later to build. +#endif + #include #include diff --git a/Profile/Profile.cpp b/Profile/Profile.cpp index 4f4e13f..c83189c 100644 --- a/Profile/Profile.cpp +++ b/Profile/Profile.cpp @@ -14,6 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include + +#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006) + #error This application requires Corrade 2020.06 or later to build. +#endif + #include #include diff --git a/ProfileManager/ProfileManager.cpp b/ProfileManager/ProfileManager.cpp index 324401a..82938a8 100644 --- a/ProfileManager/ProfileManager.cpp +++ b/ProfileManager/ProfileManager.cpp @@ -14,6 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include + +#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006) + #error This application requires Corrade 2020.06 or later to build. +#endif + #include #include diff --git a/ScreenshotManager/ScreenshotManager.cpp b/ScreenshotManager/ScreenshotManager.cpp index 37a2154..63bc9d2 100644 --- a/ScreenshotManager/ScreenshotManager.cpp +++ b/ScreenshotManager/ScreenshotManager.cpp @@ -14,6 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include + +#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006) + #error This application requires Corrade 2020.06 or later to build. +#endif + #include #include diff --git a/main.cpp b/main.cpp index 22d187c..219a01b 100644 --- a/main.cpp +++ b/main.cpp @@ -14,6 +14,12 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . +#include + +#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006) + #error This application requires Corrade 2020.06 or later to build. +#endif + #include #include "GUI/EvtMainFrame.h"