-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
very basic build system changes for compiling Qt5 GUI
Signed-off-by: Tolga Cakir <tolga@cevel.net>
- Loading branch information
Showing
10 changed files
with
87 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) | ||
PROJECT(elgato-gchd) | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra") | ||
|
||
ADD_SUBDIRECTORY(src) | ||
ADD_SUBDIRECTORY(src/gui) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FIND_PACKAGE(Qt5Core) | ||
FIND_PACKAGE(Qt5Widgets) | ||
|
||
IF(Qt5Core_FOUND AND Qt5Widgets_FOUND) | ||
SET(CMAKE_AUTOMOC ON) | ||
SET(CMAKE_AUTOUIC ON) | ||
SET(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} GUI_SRC) | ||
|
||
ADD_EXECUTABLE("q${PROJECT_NAME}" ${GUI_SRC}) | ||
TARGET_LINK_LIBRARIES("q${PROJECT_NAME}" stdc++ ${LIBUSB_LIBRARIES} Qt5::Core Qt5::Widgets) | ||
|
||
INSTALL(TARGETS "q${PROJECT_NAME}" DESTINATION bin) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "widget.hpp" | ||
#include <QApplication> | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
QApplication a(argc, argv); | ||
Widget w; | ||
w.show(); | ||
|
||
return a.exec(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#include "widget.hpp" | ||
#include "ui_widget.h" | ||
|
||
Widget::Widget(QWidget *parent) : | ||
QWidget(parent), | ||
ui(new Ui::Widget) | ||
{ | ||
ui->setupUi(this); | ||
} | ||
|
||
Widget::~Widget() | ||
{ | ||
delete ui; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef WIDGET_HPP | ||
#define WIDGET_HPP | ||
|
||
#include <QWidget> | ||
|
||
namespace Ui { | ||
class Widget; | ||
} | ||
|
||
class Widget : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit Widget(QWidget *parent = 0); | ||
~Widget(); | ||
|
||
private: | ||
Ui::Widget *ui; | ||
}; | ||
|
||
#endif // WIDGET_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<ui version="4.0"> | ||
<class>Widget</class> | ||
<widget class="QWidget" name="Widget" > | ||
<property name="geometry" > | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>400</width> | ||
<height>300</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle" > | ||
<string>Widget</string> | ||
</property> | ||
</widget> | ||
<layoutDefault spacing="6" margin="11" /> | ||
<pixmapfunction></pixmapfunction> | ||
<resources/> | ||
<connections/> | ||
</ui> |