summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2017-08-11 15:00:33 +0200
committerSimon Rettberg2017-08-11 15:00:33 +0200
commit1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc (patch)
treeb20cba2e068c96973ce6259b73c00e0c2b68c086
parentinitial commit (diff)
downloadslxgreeter-1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc.tar.gz
slxgreeter-1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc.tar.xz
slxgreeter-1a0bb4e833f4a6dbef65f4f4641f9920c13a04fc.zip
Move code to src/, tweak CMakeLists.txt
-rw-r--r--CMakeLists.txt17
-rw-r--r--src/loginform.cpp (renamed from loginform.cpp)0
-rw-r--r--src/loginform.h (renamed from loginform.h)0
-rw-r--r--src/loginform.ui (renamed from loginform.ui)0
-rw-r--r--src/main.cpp (renamed from main.cpp)0
-rw-r--r--src/mainwindow.cpp (renamed from mainwindow.cpp)0
-rw-r--r--src/mainwindow.h (renamed from mainwindow.h)0
-rw-r--r--src/settings.cpp (renamed from settings.cpp)0
-rw-r--r--src/settings.h (renamed from settings.h)0
9 files changed, 10 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d217c7..2fd0179 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,20 +1,23 @@
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
-set(PROJECT qt-lightdm-greeter)
-project(${PROJECT})
+
+PROJECT(qt-lightdm-greeter)
+
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-file(GLOB SRCS *.cpp *ui *moc)
-message(STATUS "SRCS ${SRCS}")
+file(GLOB_RECURSE SRCS src/*.cpp)
+file(GLOB_RECURSE UIS src/*.ui)
+#message(STATUS "SRCS ${SRCS}")
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Svg REQUIRED)
-#find_package(Qt5X11Extras REQUIRED QUIET)
QT5_ADD_RESOURCES(RSCS qt-lightdm-greeter.qrc)
-QT5_WRAP_UI(loginform_UI loginform.ui)
+QT5_WRAP_UI(UI_HEADERS ${UIS})
include(FindPkgConfig)
pkg_check_modules(LIGHTDM_QT liblightdm-qt5-3)
@@ -24,7 +27,7 @@ include_directories ( ${CMAKE_CURRENT_SOURCE_DIR}
${LIGHTDM_QT_INCLUDE_DIRS}
)
-add_executable ( qt-lightdm-greeter ${SRCS} ${RSCS})
+add_executable ( qt-lightdm-greeter ${SRCS} ${RSCS} ${UI_HEADERS} )
target_link_libraries ( qt-lightdm-greeter Qt5::Widgets Qt5::Svg ${LIGHTDM_QT_LIBRARIES} )
diff --git a/loginform.cpp b/src/loginform.cpp
index 3f40e81..3f40e81 100644
--- a/loginform.cpp
+++ b/src/loginform.cpp
diff --git a/loginform.h b/src/loginform.h
index 8346a58..8346a58 100644
--- a/loginform.h
+++ b/src/loginform.h
diff --git a/loginform.ui b/src/loginform.ui
index 3525a9d..3525a9d 100644
--- a/loginform.ui
+++ b/src/loginform.ui
diff --git a/main.cpp b/src/main.cpp
index c0ce7bc..c0ce7bc 100644
--- a/main.cpp
+++ b/src/main.cpp
diff --git a/mainwindow.cpp b/src/mainwindow.cpp
index a8dbd21..a8dbd21 100644
--- a/mainwindow.cpp
+++ b/src/mainwindow.cpp
diff --git a/mainwindow.h b/src/mainwindow.h
index 738d423..738d423 100644
--- a/mainwindow.h
+++ b/src/mainwindow.h
diff --git a/settings.cpp b/src/settings.cpp
index 0c37166..0c37166 100644
--- a/settings.cpp
+++ b/src/settings.cpp
diff --git a/settings.h b/src/settings.h
index 7f2b135..7f2b135 100644
--- a/settings.h
+++ b/src/settings.h