summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt57
-rw-r--r--bluetooth/CMakeLists.txt2
-rw-r--r--bluetooth/bluetooth.cpp (renamed from bluetooth.cpp)0
-rw-r--r--bluetooth/bluetooth.h (renamed from bluetooth.h)0
-rw-r--r--bluetooth/bluetoothmessage.cpp (renamed from bluetoothmessage.cpp)0
-rw-r--r--bluetooth/bluetoothmessage.h (renamed from bluetoothmessage.h)0
-rw-r--r--mediaplayer/CMakeLists.txt2
-rw-r--r--mediaplayer/mediaplayer.cpp (renamed from mediaplayer.cpp)0
-rw-r--r--mediaplayer/mediaplayer.h (renamed from mediaplayer.h)0
-rw-r--r--mediaplayer/mediaplayermessage.cpp (renamed from mediaplayermessage.cpp)0
-rw-r--r--mediaplayer/mediaplayermessage.h (renamed from mediaplayermessage.h)0
-rw-r--r--pbap/CMakeLists.txt2
-rw-r--r--pbap/pbap.cpp (renamed from pbap.cpp)0
-rw-r--r--pbap/pbap.h (renamed from pbap.h)0
-rw-r--r--pbap/pbapmessage.cpp (renamed from pbapmessage.cpp)0
-rw-r--r--pbap/pbapmessage.h (renamed from pbapmessage.h)0
-rw-r--r--telephony/CMakeLists.txt2
-rw-r--r--telephony/telephony.cpp (renamed from telephony.cpp)0
-rw-r--r--telephony/telephony.h (renamed from telephony.h)0
-rw-r--r--telephony/telephonymessage.cpp (renamed from telephonymessage.cpp)0
-rw-r--r--telephony/telephonymessage.h (renamed from telephonymessage.h)0
-rw-r--r--weather/CMakeLists.txt2
-rw-r--r--weather/weather.cpp (renamed from weather.cpp)0
-rw-r--r--weather/weather.h (renamed from weather.h)0
-rw-r--r--weather/weathermessage.cpp (renamed from weathermessage.cpp)0
-rw-r--r--weather/weathermessage.h (renamed from weathermessage.h)0
26 files changed, 58 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9165f49..7b08ed8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,25 +8,64 @@ find_package(Qt5WebSockets REQUIRED)
include(GNUInstallDirs)
+macro (add_headers)
+ file (RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
+ foreach (_hdr ${ARGN})
+ if (_relPath)
+ list (APPEND HDRS "${_relPath}/${_hdr}")
+ else()
+ list (APPEND HDRS "${_hdr}")
+ endif()
+ endforeach()
+ if (_relPath)
+ set (HDRS ${HDRS} PARENT_SCOPE)
+ endif()
+endmacro()
+
+macro (add_sources)
+ file (RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
+ foreach (_src ${ARGN})
+ if (_relPath)
+ list (APPEND SRCS "${_relPath}/${_src}")
+ else()
+ list (APPEND SRCS "${_src}")
+ endif()
+ endforeach()
+ if (_relPath)
+ set (SRCS ${SRCS} PARENT_SCOPE)
+ endif()
+endmacro()
+
set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
set(PRIVATE_LIBS "${PRIVATE_LIBS} -lqtappfw")
CONFIGURE_FILE("qtappfw.pc.in" "qtappfw.pc" @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qtappfw.pc
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
-add_library(qtappfw SHARED message.cpp messageengine.cpp
- responsemessage.cpp
- bluetooth.cpp bluetoothmessage.cpp
- mediaplayer.cpp mediaplayermessage.cpp
- pbap.cpp pbapmessage.cpp
- telephony.cpp telephonymessage.cpp
- weather.cpp weathermessage.cpp)
+set (SUBDIRS
+ bluetooth
+ mediaplayer
+ pbap
+ telephony
+ weather)
+
+add_headers(message.h messageengine.h)
+add_sources(message.cpp messageengine.cpp responsemessage.cpp)
+
+foreach(subdir ${SUBDIRS})
+ add_subdirectory(${subdir})
+endforeach()
+
+add_library(qtappfw SHARED ${SRCS})
+
target_link_libraries(qtappfw Qt5::WebSockets vcard)
set_target_properties(qtappfw PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION 1
- PUBLIC_HEADER "message.h;messageengine.h;bluetooth.h;bluetoothmessage.h;mediaplayer.h;mediaplayermessage.h;pbap.h;pbapmessage.h;responsemessage.h;telephony.h;telephonymessage.h;weather.h;weathermessage.h")
-target_include_directories(qtappfw PRIVATE .)
+ PUBLIC_HEADER "${HDRS}")
+
+target_include_directories(qtappfw PRIVATE . ${SUBDIRS})
+
install(TARGETS qtappfw
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qtappfw)
diff --git a/bluetooth/CMakeLists.txt b/bluetooth/CMakeLists.txt
new file mode 100644
index 0000000..c068a9f
--- /dev/null
+++ b/bluetooth/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_headers(bluetooth.h bluetoothmessage.h)
+add_sources(bluetooth.cpp bluetoothmessage.cpp)
diff --git a/bluetooth.cpp b/bluetooth/bluetooth.cpp
index cc5f496..cc5f496 100644
--- a/bluetooth.cpp
+++ b/bluetooth/bluetooth.cpp
diff --git a/bluetooth.h b/bluetooth/bluetooth.h
index 24605cf..24605cf 100644
--- a/bluetooth.h
+++ b/bluetooth/bluetooth.h
diff --git a/bluetoothmessage.cpp b/bluetooth/bluetoothmessage.cpp
index 52ecbed..52ecbed 100644
--- a/bluetoothmessage.cpp
+++ b/bluetooth/bluetoothmessage.cpp
diff --git a/bluetoothmessage.h b/bluetooth/bluetoothmessage.h
index 6ce2f3e..6ce2f3e 100644
--- a/bluetoothmessage.h
+++ b/bluetooth/bluetoothmessage.h
diff --git a/mediaplayer/CMakeLists.txt b/mediaplayer/CMakeLists.txt
new file mode 100644
index 0000000..fd7e3f3
--- /dev/null
+++ b/mediaplayer/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_headers(mediaplayer.h mediaplayermessage.h)
+add_sources(mediaplayer.cpp mediaplayermessage.cpp)
diff --git a/mediaplayer.cpp b/mediaplayer/mediaplayer.cpp
index 5755f37..5755f37 100644
--- a/mediaplayer.cpp
+++ b/mediaplayer/mediaplayer.cpp
diff --git a/mediaplayer.h b/mediaplayer/mediaplayer.h
index bf0b8bf..bf0b8bf 100644
--- a/mediaplayer.h
+++ b/mediaplayer/mediaplayer.h
diff --git a/mediaplayermessage.cpp b/mediaplayer/mediaplayermessage.cpp
index cda09d2..cda09d2 100644
--- a/mediaplayermessage.cpp
+++ b/mediaplayer/mediaplayermessage.cpp
diff --git a/mediaplayermessage.h b/mediaplayer/mediaplayermessage.h
index c164cde..c164cde 100644
--- a/mediaplayermessage.h
+++ b/mediaplayer/mediaplayermessage.h
diff --git a/pbap/CMakeLists.txt b/pbap/CMakeLists.txt
new file mode 100644
index 0000000..99edd7d
--- /dev/null
+++ b/pbap/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_headers(pbap.h pbapmessage.h)
+add_sources(pbap.cpp pbapmessage.cpp)
diff --git a/pbap.cpp b/pbap/pbap.cpp
index 43db8bd..43db8bd 100644
--- a/pbap.cpp
+++ b/pbap/pbap.cpp
diff --git a/pbap.h b/pbap/pbap.h
index 2a5fb61..2a5fb61 100644
--- a/pbap.h
+++ b/pbap/pbap.h
diff --git a/pbapmessage.cpp b/pbap/pbapmessage.cpp
index 751bb9f..751bb9f 100644
--- a/pbapmessage.cpp
+++ b/pbap/pbapmessage.cpp
diff --git a/pbapmessage.h b/pbap/pbapmessage.h
index 65751cb..65751cb 100644
--- a/pbapmessage.h
+++ b/pbap/pbapmessage.h
diff --git a/telephony/CMakeLists.txt b/telephony/CMakeLists.txt
new file mode 100644
index 0000000..1dfcd63
--- /dev/null
+++ b/telephony/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_headers(telephony.h telephonymessage.h)
+add_sources(telephony.cpp telephonymessage.cpp)
diff --git a/telephony.cpp b/telephony/telephony.cpp
index 7f6a571..7f6a571 100644
--- a/telephony.cpp
+++ b/telephony/telephony.cpp
diff --git a/telephony.h b/telephony/telephony.h
index 7cff598..7cff598 100644
--- a/telephony.h
+++ b/telephony/telephony.h
diff --git a/telephonymessage.cpp b/telephony/telephonymessage.cpp
index 67128cf..67128cf 100644
--- a/telephonymessage.cpp
+++ b/telephony/telephonymessage.cpp
diff --git a/telephonymessage.h b/telephony/telephonymessage.h
index 87d06a6..87d06a6 100644
--- a/telephonymessage.h
+++ b/telephony/telephonymessage.h
diff --git a/weather/CMakeLists.txt b/weather/CMakeLists.txt
new file mode 100644
index 0000000..44b4d4d
--- /dev/null
+++ b/weather/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_headers(weather.h weathermessage.h)
+add_sources(weather.cpp weathermessage.cpp)
diff --git a/weather.cpp b/weather/weather.cpp
index a4edb2a..a4edb2a 100644
--- a/weather.cpp
+++ b/weather/weather.cpp
diff --git a/weather.h b/weather/weather.h
index ffbbcc6..ffbbcc6 100644
--- a/weather.h
+++ b/weather/weather.h
diff --git a/weathermessage.cpp b/weather/weathermessage.cpp
index 6b4aa3c..6b4aa3c 100644
--- a/weathermessage.cpp
+++ b/weather/weathermessage.cpp
diff --git a/weathermessage.h b/weather/weathermessage.h
index e1d4dac..e1d4dac 100644
--- a/weathermessage.h
+++ b/weather/weathermessage.h