diff --git a/.gitignore b/.gitignore index 6742ac6..af9632c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # CMake build files build/ build-*/ +cmake-build-*/ CMakeFiles/ CMakeCache.txt cmake_install.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 031bd3e..80809b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,25 +7,31 @@ pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0 gstreamer-video-1.0 gstreamer qt_standard_project_setup() +set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui) + qt_add_executable(gstreamerViewer WIN32 MACOSX_BUNDLE - main.cpp - mainwindow.cpp - mainwindow.h - mainwindow.ui - socketclient.cpp - socketclient.h - gstreamerpipelinewidget.cpp - gstreamerpipelinewidget.h - cameracontrolwidget.cpp - cameracontrolwidget.h - videoviewerwidget.cpp - videoviewerwidget.h - aboutwidget.cpp - aboutwidget.h + src/main.cpp + src/mainwindow.cpp + include/mainwindow.h + ui/mainwindow.ui + src/socketclient.cpp + include/socketclient.h + src/gstreamerpipelinewidget.cpp + include/gstreamerpipelinewidget.h + src/cameracontrolwidget.cpp + include/cameracontrolwidget.h + src/videoviewerwidget.cpp + include/videoviewerwidget.h + src/aboutwidget.cpp + include/aboutwidget.h ) -target_include_directories(gstreamerViewer PRIVATE ${GSTREAMER_INCLUDE_DIRS}) +target_include_directories(gstreamerViewer + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${GSTREAMER_INCLUDE_DIRS} +) target_link_libraries(gstreamerViewer PRIVATE Qt::Core diff --git a/SOCKET_API.md b/docs/SOCKET_API.md similarity index 100% rename from SOCKET_API.md rename to docs/SOCKET_API.md diff --git a/aboutwidget.h b/include/aboutwidget.h similarity index 100% rename from aboutwidget.h rename to include/aboutwidget.h diff --git a/cameracontrolwidget.h b/include/cameracontrolwidget.h similarity index 100% rename from cameracontrolwidget.h rename to include/cameracontrolwidget.h diff --git a/gstreamerpipelinewidget.h b/include/gstreamerpipelinewidget.h similarity index 100% rename from gstreamerpipelinewidget.h rename to include/gstreamerpipelinewidget.h diff --git a/mainwindow.h b/include/mainwindow.h similarity index 100% rename from mainwindow.h rename to include/mainwindow.h diff --git a/socketclient.h b/include/socketclient.h similarity index 100% rename from socketclient.h rename to include/socketclient.h diff --git a/videoviewerwidget.h b/include/videoviewerwidget.h similarity index 100% rename from videoviewerwidget.h rename to include/videoviewerwidget.h diff --git a/build.sh b/scripts/build.sh similarity index 100% rename from build.sh rename to scripts/build.sh diff --git a/run.sh b/scripts/run.sh similarity index 100% rename from run.sh rename to scripts/run.sh diff --git a/test_connection.sh b/scripts/test_connection.sh similarity index 100% rename from test_connection.sh rename to scripts/test_connection.sh diff --git a/aboutwidget.cpp b/src/aboutwidget.cpp similarity index 100% rename from aboutwidget.cpp rename to src/aboutwidget.cpp diff --git a/cameracontrolwidget.cpp b/src/cameracontrolwidget.cpp similarity index 100% rename from cameracontrolwidget.cpp rename to src/cameracontrolwidget.cpp diff --git a/gstreamerpipelinewidget.cpp b/src/gstreamerpipelinewidget.cpp similarity index 100% rename from gstreamerpipelinewidget.cpp rename to src/gstreamerpipelinewidget.cpp diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/mainwindow.cpp b/src/mainwindow.cpp similarity index 100% rename from mainwindow.cpp rename to src/mainwindow.cpp diff --git a/socketclient.cpp b/src/socketclient.cpp similarity index 100% rename from socketclient.cpp rename to src/socketclient.cpp diff --git a/videoviewerwidget.cpp b/src/videoviewerwidget.cpp similarity index 100% rename from videoviewerwidget.cpp rename to src/videoviewerwidget.cpp diff --git a/mainwindow.ui b/ui/mainwindow.ui similarity index 100% rename from mainwindow.ui rename to ui/mainwindow.ui