summaryrefslogtreecommitdiff
path: root/src/components/hmi_message_handler/CMakeLists.txt
diff options
context:
space:
mode:
authorIvo Stoilov (GitHub) <istoilov@luxoft.com>2016-12-30 17:47:39 +0200
committerIvo Stoilov (GitHub) <istoilov@luxoft.com>2016-12-30 17:47:39 +0200
commit16a403b3cca43e4b211525f4b6c80a43466b5e97 (patch)
tree52c905b3f4afa687996156c965c0cb641fa3c153 /src/components/hmi_message_handler/CMakeLists.txt
parent7d29edc6716188776d4a5668d7960dc58724f611 (diff)
downloadsdl_core-16a403b3cca43e4b211525f4b6c80a43466b5e97.tar.gz
Refactor CMake files
Merge components refactoring from Windows port barnch - add cmake tools - refactor protocol handler CMakeLists.txt file - refactor interfaces CMakeLists.txt file - refactor smart object CMakeLists.txt file - refactor formatters CMakeLists.txt file - refactor config profile CMakeLists.txt file - refactor policy CMakeLists.txt file - refactor resumption CMakeLists.txt file - refactor connection handler CMakeLists.txt file - refactor application manager CMakeLists.txt file - refactor security manager CMakeLists.txt file - refactor dbus CMakeLists.txt file - refactor hmi message handler CMakeLists.txt file - refactor transport manager CMakeLists.txt file - refactor utils CMakeLists.txt file - refactor components root CMakeLists.txt file - refactor utils CMakeLists.txt file - refactor components root CMakeLists.txt file - refactor media manager CMakeLists.txt file - refactor telemetry monitor CMakeLists.txt file - refactor appmain CMakeLists.txt file - refactor plugins CMakeLists.txt file - refactor 3rd party CMakeLists.txt files - create cmake helper for interface generation - refactor root CMakeLists.txt file Move cmake modules to tools Related taks APPLINK-30588 APPLINK-30972
Diffstat (limited to 'src/components/hmi_message_handler/CMakeLists.txt')
-rw-r--r--src/components/hmi_message_handler/CMakeLists.txt37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/components/hmi_message_handler/CMakeLists.txt b/src/components/hmi_message_handler/CMakeLists.txt
index 49aea93bda..c1dfca5e67 100644
--- a/src/components/hmi_message_handler/CMakeLists.txt
+++ b/src/components/hmi_message_handler/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, Ford Motor Company
+# Copyright (c) 2016, Ford Motor Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,6 +28,8 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
+include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/platform.cmake)
+include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
include_directories (
include/
@@ -46,29 +48,36 @@ include_directories (
${LOG4CXX_INCLUDE_DIRECTORY}
)
-IF (HMIADAPTER STREQUAL "dbus")
- set (DBUS_SOURCE ./src/dbus_message_adapter.cc)
- set (DBUS_ADAPTER DBus)
-ENDIF ()
+set(PATHS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
+)
+
+if (HMIADAPTER STREQUAL "dbus")
+ set(EXCLUDE_PATHS)
+ set(DBUS_ADAPTER DBus)
+else()
+ set(EXCLUDE_PATHS dbus_message_adapter.cc)
+ set(DBUS_ADAPTER)
+endif ()
-set (SOURCES
- ${COMPONENTS_DIR}/hmi_message_handler/src/hmi_message_handler_impl.cc
- ${COMPONENTS_DIR}/hmi_message_handler/src/messagebroker_adapter.cc
- ${COMPONENTS_DIR}/hmi_message_handler/src/hmi_message_adapter_impl.cc
- ${DBUS_SOURCE}
+list(APPEND EXCLUDE_PATHS
+ mqueue_adapter.cc
)
+collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}")
+
set(LIBRARIES
- Utils
- ${DBUS_ADAPTER}
- ${RTLIB}
+ Utils
+ ${DBUS_ADAPTER}
+ ${RTLIB}
)
add_library("HMIMessageHandler" ${SOURCES})
target_link_libraries("HMIMessageHandler" ${LIBRARIES})
if(ENABLE_LOG)
- target_link_libraries("HMIMessageHandler" log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
+ target_link_libraries("HMIMessageHandler" log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
endif()
# Tests temporary are inactivated. For details please check