Add the ability to not use the Corrade submodule.
Also add a version check, just in case.
This commit is contained in:
parent
34d938548a
commit
854a7bbcca
6 changed files with 39 additions and 5 deletions
|
@ -22,11 +22,15 @@ set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS ON)
|
set(CMAKE_CXX_EXTENSIONS ON)
|
||||||
|
|
||||||
set(BUILD_STATIC ON CACHE BOOL "" FORCE)
|
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)
|
||||||
set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE)
|
|
||||||
set(WITH_PLUGINMANAGER OFF CACHE BOOL "" FORCE)
|
if(NOT USE_CORRADE_SUBMODULE)
|
||||||
set(WITH_TESTSUITE OFF CACHE BOOL "" FORCE)
|
set(BUILD_STATIC ON CACHE BOOL "" FORCE)
|
||||||
add_subdirectory(corrade)
|
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)
|
find_package(Corrade REQUIRED Containers Utility)
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <Corrade/version.h>
|
||||||
|
|
||||||
|
#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006)
|
||||||
|
#error This application requires Corrade 2020.06 or later to build.
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <wtsapi32.h>
|
#include <wtsapi32.h>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <Corrade/version.h>
|
||||||
|
|
||||||
|
#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006)
|
||||||
|
#error This application requires Corrade 2020.06 or later to build.
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <Corrade/Containers/Array.h>
|
#include <Corrade/Containers/Array.h>
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <Corrade/version.h>
|
||||||
|
|
||||||
|
#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006)
|
||||||
|
#error This application requires Corrade 2020.06 or later to build.
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <Corrade/version.h>
|
||||||
|
|
||||||
|
#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006)
|
||||||
|
#error This application requires Corrade 2020.06 or later to build.
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <Corrade/Utility/Directory.h>
|
#include <Corrade/Utility/Directory.h>
|
||||||
|
|
6
main.cpp
6
main.cpp
|
@ -14,6 +14,12 @@
|
||||||
// You should have received a copy of the GNU General Public License
|
// You should have received a copy of the GNU General Public License
|
||||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include <Corrade/version.h>
|
||||||
|
|
||||||
|
#if !(CORRADE_VERSION_YEAR * 100 + CORRADE_VERSION_MONTH >= 202006)
|
||||||
|
#error This application requires Corrade 2020.06 or later to build.
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <wx/app.h>
|
#include <wx/app.h>
|
||||||
|
|
||||||
#include "GUI/EvtMainFrame.h"
|
#include "GUI/EvtMainFrame.h"
|
||||||
|
|
Loading…
Reference in a new issue