summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-06-01 00:54:11 +0200
committerRaquel Medina <raquel.medina@konsulko.com>2020-06-09 23:17:30 +0200
commitae208a6a303982535c44a7f124f38b4252528ab4 (patch)
tree91c75a9442c209c6360d8b539be2dd50832ff1b3 /CMakeLists.txt
parent45dc51ab0564fdec1595f1e193a18abfced88ec5 (diff)
split qtappfw in independent qtappfw-* modules
Bug-AGL: SPEC-3390 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ib8096c8dd2d59d3728e824ae13ba401da0971dc4
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt67
1 files changed, 17 insertions, 50 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a37ee3..28b724c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.7.2)
-project(libqtappfw VERSION 1.0.0 LANGUAGES CXX)
+project(qtappfw VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
@@ -11,41 +11,25 @@ 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)
+set(PRIVATE_LIBS "${PRIVATE_LIBS} -lqtappfw-core
+ -lqtappfw-bt
+ -lqtappfw-hvac
+ -lqtappfw-bt-map
+ -lqtappfw-mediaplayer
+ -lqtappfw-navigation
+ -lqtappfw-network
+ -lqtappfw-bt-pbap
+ -lqtappfw-radio
+ -lqtappfw-signal-composer
+ -lqtappfw-phone
+ -lqtappfw-voice
+ -lqtappfw-voice-metadata
+ -lqtappfw-weather")
+
set (SUBDIRS
+ core
docs
bluetooth
hvac
@@ -61,23 +45,6 @@ set (SUBDIRS
voice-capabilities
weather)
-add_headers(message.h messagefactory.h messageengine.h messageenginefactory.h responsemessage.h callmessage.h eventmessage.h)
-add_sources(message.cpp messagefactory.cpp messageengine.cpp messageenginefactory.cpp responsemessage.cpp callmessage.cpp eventmessage.cpp)
-
foreach(subdir ${SUBDIRS})
add_subdirectory(${subdir})
endforeach()
-
-add_library(qtappfw SHARED ${SRCS})
-
-target_link_libraries(qtappfw Qt5::WebSockets)
-set_target_properties(qtappfw PROPERTIES
- VERSION ${PROJECT_VERSION}
- SOVERSION 1
- PUBLIC_HEADER "${HDRS}")
-
-target_include_directories(qtappfw PRIVATE . ${SUBDIRS})
-
-install(TARGETS qtappfw
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/qtappfw)