From 093f74a846415266ae24cad6a7ee4bdd0506312f Mon Sep 17 00:00:00 2001 From: Kevin Whitaker <eyecreate@gmail.com> Date: Fri, 27 Jan 2017 22:44:36 -0500 Subject: [PATCH] Add basic classes for application. Move source around and properly fix up build system to link and use correct c++ compiler version. --- CMakeLists.txt | 7 +++++-- src/GroovePlayer.cpp | 20 ++++++++++++++++++++ src/GroovePlayer.h | 27 +++++++++++++++++++++++++++ src/WebInterface.cpp | 20 ++++++++++++++++++++ src/WebInterface.h | 29 +++++++++++++++++++++++++++++ main.cpp => src/main.cpp | 1 + 6 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 src/GroovePlayer.cpp create mode 100644 src/GroovePlayer.h create mode 100644 src/WebInterface.cpp create mode 100644 src/WebInterface.h rename main.cpp => src/main.cpp (82%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59f56d2..c755f35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,14 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.1) project(arbitrateor) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake") find_package(Wt REQUIRED) find_package(Groove REQUIRED) -add_executable(arbitrateor main.cpp) +add_executable(arbitrateor src/main.cpp src/WebInterface.cpp src/GroovePlayer.cpp) +target_link_libraries(arbitrateor ${Wt_LIBRARIES} ${GROOVE_LIBRARY}) install(TARGETS arbitrateor RUNTIME DESTINATION bin) diff --git a/src/GroovePlayer.cpp b/src/GroovePlayer.cpp new file mode 100644 index 0000000..aef1540 --- /dev/null +++ b/src/GroovePlayer.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include "GroovePlayer.h" diff --git a/src/GroovePlayer.h b/src/GroovePlayer.h new file mode 100644 index 0000000..6150665 --- /dev/null +++ b/src/GroovePlayer.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef GROOVEPLAYER_H +#define GROOVEPLAYER_H + +class GroovePlayer +{ +}; + +#endif // GROOVEPLAYER_H diff --git a/src/WebInterface.cpp b/src/WebInterface.cpp new file mode 100644 index 0000000..68b2f02 --- /dev/null +++ b/src/WebInterface.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include "WebInterface.h" diff --git a/src/WebInterface.h b/src/WebInterface.h new file mode 100644 index 0000000..3a157e1 --- /dev/null +++ b/src/WebInterface.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2017 Kevin Whitaker <eyecreate@gmail.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef WEBINTERFACE_H +#define WEBINTERFACE_H + +#include <Wt/WApplication> + +class WebInterface : public Wt::WApplication +{ +}; + +#endif // WEBINTERFACE_H diff --git a/main.cpp b/src/main.cpp similarity index 82% rename from main.cpp rename to src/main.cpp index 77ebb22..4a1cab3 100644 --- a/main.cpp +++ b/src/main.cpp @@ -1,4 +1,5 @@ #include <iostream> +#include "WebInterface.h" int main ( int argc, char** argv ) { -- GitLab