summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/components')
-rw-r--r--src/components/application_manager/CMakeLists.txt19
-rw-r--r--src/components/application_manager/test/CMakeLists.txt2
-rwxr-xr-xsrc/components/application_manager/test/message_helper/CMakeLists.txt9
-rw-r--r--src/components/application_manager/test/state_controller/CMakeLists.txt2
-rw-r--r--src/components/config_profile/CMakeLists.txt2
-rw-r--r--src/components/config_profile/test/CMakeLists.txt4
-rw-r--r--src/components/connection_handler/CMakeLists.txt2
-rw-r--r--src/components/connection_handler/test/CMakeLists.txt8
-rw-r--r--src/components/dbus/CMakeLists.txt28
-rw-r--r--src/components/formatters/CMakeLists.txt7
-rw-r--r--src/components/formatters/test/CMakeLists.txt2
-rw-r--r--src/components/hmi_message_handler/CMakeLists.txt6
-rw-r--r--src/components/media_manager/CMakeLists.txt4
-rw-r--r--src/components/policy/CMakeLists.txt4
-rw-r--r--src/components/policy/test/CMakeLists.txt14
-rw-r--r--src/components/protocol/CMakeLists.txt1
-rw-r--r--src/components/protocol_handler/CMakeLists.txt1
-rw-r--r--src/components/protocol_handler/test/CMakeLists.txt14
-rw-r--r--src/components/resumption/CMakeLists.txt2
-rw-r--r--src/components/resumption/test/CMakeLists.txt5
-rw-r--r--src/components/rpc_base/CMakeLists.txt16
-rw-r--r--src/components/rpc_base/test/CMakeLists.txt11
-rw-r--r--src/components/security_manager/CMakeLists.txt3
-rw-r--r--src/components/smart_objects/CMakeLists.txt2
-rw-r--r--src/components/smart_objects/test/CMakeLists.txt1
-rw-r--r--src/components/telemetry_monitor/CMakeLists.txt2
-rw-r--r--src/components/telemetry_monitor/test/CMakeLists.txt22
-rw-r--r--src/components/transport_manager/CMakeLists.txt17
-rw-r--r--src/components/transport_manager/test/CMakeLists.txt4
-rw-r--r--src/components/utils/CMakeLists.txt12
-rw-r--r--src/components/utils/src/qdb_wrapper/CMakeLists.txt17
-rw-r--r--src/components/utils/src/sqlite_wrapper/CMakeLists.txt9
-rw-r--r--src/components/utils/test/CMakeLists.txt76
33 files changed, 131 insertions, 197 deletions
diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt
index d44cf6c69e..6fd261aad0 100644
--- a/src/components/application_manager/CMakeLists.txt
+++ b/src/components/application_manager/CMakeLists.txt
@@ -34,8 +34,7 @@ set (AM_TEST_DIR ${AM_SOURCE_DIR}/test)
set (AM_MOCK_DIR ${AM_TEST_DIR}/mock)
include_directories (
- include/
- ${COMPONENTS_DIR}
+ ${COMPONENTS_DIR}/application_manager/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/formatters/include/
${COMPONENTS_DIR}/protocol_handler/include/
@@ -47,7 +46,6 @@ include_directories (
${COMPONENTS_DIR}/request_watchdog/include/
${COMPONENTS_DIR}/resumption/include/
${COMPONENTS_DIR}/rpc_base/include/
- ${COMPONENTS_DIR}/interfaces
${CMAKE_BINARY_DIR}/src/components/
${COMPONENTS_DIR}/policy/include/
${JSONCPP_INCLUDE_DIRECTORY}
@@ -56,18 +54,6 @@ include_directories (
${LOG4CXX_INCLUDE_DIRECTORY}
)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
- include_directories(
- ${COMPONENTS_DIR}/utils/include/utils/sqlite_wrapper/
- )
-endif ()
-
-if (${CMAKE_SYSTEM_NAME} MATCHES "QNX")
- include_directories(
- ${COMPONENTS_DIR}/utils/include/utils/qdb_wrapper/
- )
-endif()
-
file (GLOB SOURCES
${AM_SOURCE_DIR}/src/*
)
@@ -84,9 +70,6 @@ ${AM_SOURCE_DIR}/src/policies/delegates/app_permission_delegate.cc
${AM_SOURCE_DIR}/src/policies/delegates/statistics_delegate.cc
)
- include_directories(
- ${COMPONENTS_DIR}/policy/src/policy/policy_table/table_struct
- )
file (GLOB EVENT_ENGINE
${AM_SOURCE_DIR}/src/event_engine/*
)
diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt
index 118cda4fcb..e16170be0b 100644
--- a/src/components/application_manager/test/CMakeLists.txt
+++ b/src/components/application_manager/test/CMakeLists.txt
@@ -152,7 +152,7 @@ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libPolicy.so
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath=${CMAKE_CURRENT_BINARY_DIR}")
create_test("application_manager_test" "${testSources}" "${testLibraries}" )
-# TODO [AKozoriz] : Fix not buildable tests
+
set(ResumptionData_SOURCES
${AM_TEST_DIR}/resumption/resumption_data_test.cc
${AM_TEST_DIR}/resumption/resumption_data_db_test.cc
diff --git a/src/components/application_manager/test/message_helper/CMakeLists.txt b/src/components/application_manager/test/message_helper/CMakeLists.txt
index bfc0228bbb..d115ad8b40 100755
--- a/src/components/application_manager/test/message_helper/CMakeLists.txt
+++ b/src/components/application_manager/test/message_helper/CMakeLists.txt
@@ -30,14 +30,9 @@
if(BUILD_TESTS)
-set(appMain_DIR ${CMAKE_SOURCE_DIR}/src/appMain)
-
include_directories(
${GMOCK_INCLUDE_DIRECTORY}
- ${COMPONENTS_DIR}/application_manager/test/message_helper/include
- ${COMPONENTS_DIR}/application_manager/test/state_controller/include
- ${COMPONENTS_DIR}/include
- ${COMPONENTS_DIR}
+ ${COMPONENTS_DIR}/application_manager/test/include/
)
set(LIBRARIES
@@ -53,7 +48,7 @@ set(LIBRARIES
)
set(SOURCES
- #message_helper_test.cc
+ ${COMPONENTS_DIR}/application_manager/test/message_helper/message_helper_test.cc
)
create_test("message_helper_test" "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/application_manager/test/state_controller/CMakeLists.txt b/src/components/application_manager/test/state_controller/CMakeLists.txt
index 50dd931309..22f04cb900 100644
--- a/src/components/application_manager/test/state_controller/CMakeLists.txt
+++ b/src/components/application_manager/test/state_controller/CMakeLists.txt
@@ -42,7 +42,7 @@ set(LIBRARIES
)
set(SOURCES
- state_controller_test.cc
+ ${COMPONENTS_DIR}/application_manager/test/state_controller/state_controller_test.cc
${COMPONENTS_DIR}/application_manager/test/mock_message_helper.cc
)
diff --git a/src/components/config_profile/CMakeLists.txt b/src/components/config_profile/CMakeLists.txt
index 107fd58127..01f073df45 100644
--- a/src/components/config_profile/CMakeLists.txt
+++ b/src/components/config_profile/CMakeLists.txt
@@ -30,7 +30,7 @@
include_directories (
- include
+ ${COMPONENTS_DIR}/config_profile/include
${COMPONENTS_DIR}/utils/include/
${LOG4CXX_INCLUDE_DIRECTORY}
)
diff --git a/src/components/config_profile/test/CMakeLists.txt b/src/components/config_profile/test/CMakeLists.txt
index 1246bff066..9e71acee4a 100644
--- a/src/components/config_profile/test/CMakeLists.txt
+++ b/src/components/config_profile/test/CMakeLists.txt
@@ -37,8 +37,8 @@ include_directories (
set(testSources
- profile_test.cc
- ini_file_test.cc
+ ${COMPONENTS_DIR}/config_profile/test/profile_test.cc
+ ${COMPONENTS_DIR}/config_profile/test/ini_file_test.cc
)
set(testLibraries
diff --git a/src/components/connection_handler/CMakeLists.txt b/src/components/connection_handler/CMakeLists.txt
index dc1b2d24d6..c0a8e08438 100644
--- a/src/components/connection_handler/CMakeLists.txt
+++ b/src/components/connection_handler/CMakeLists.txt
@@ -32,7 +32,7 @@
set(CH_SRC_DIR ${COMPONENTS_DIR}/connection_handler/src)
include_directories (
- include
+ ${COMPONENTS_DIR}/connection_handler/include
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/utils/include/
${ENCRYPTION_INCLUDE_DIRECTORY}
diff --git a/src/components/connection_handler/test/CMakeLists.txt b/src/components/connection_handler/test/CMakeLists.txt
index 32da4bdcd8..cb312eeff4 100644
--- a/src/components/connection_handler/test/CMakeLists.txt
+++ b/src/components/connection_handler/test/CMakeLists.txt
@@ -47,10 +47,10 @@ set(LIBRARIES
)
set(SOURCES
- connection_handler_impl_test.cc
- connection_test.cc
- device_test.cc
- heart_beat_monitor_test.cc
+ ${COMPONENTS_DIR}/connection_handler/test/connection_handler_impl_test.cc
+ ${COMPONENTS_DIR}/connection_handler/test/connection_test.cc
+ ${COMPONENTS_DIR}/connection_handler/test/device_test.cc
+ ${COMPONENTS_DIR}/connection_handler/test/heart_beat_monitor_test.cc
)
file(COPY ${appMain_DIR}/smartDeviceLink.ini DESTINATION "./")
diff --git a/src/components/dbus/CMakeLists.txt b/src/components/dbus/CMakeLists.txt
index 7e7f2af787..899f46fb6f 100644
--- a/src/components/dbus/CMakeLists.txt
+++ b/src/components/dbus/CMakeLists.txt
@@ -31,9 +31,7 @@
include_directories (
${DBUS_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/include/
- ${CMAKE_SOURCE_DIR}/
- ${COMPONENTS_DIR}
+ ${COMPONENTS_DIR}/dbus/include/
${COMPONENTS_DIR}/formatters/include/
${COMPONENTS_DIR}/smart_objects/include/
${COMPONENTS_DIR}/utils/include/
@@ -43,10 +41,10 @@ include_directories (
set (SOURCES
${CMAKE_CURRENT_BINARY_DIR}/introspection_xml.cc
${CMAKE_CURRENT_BINARY_DIR}/message_descriptions.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_adapter.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_message.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/src/dbus_message_controller.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/src/schema.cc
+ ${COMPONENTS_DIR}/dbus/src/dbus_adapter.cc
+ ${COMPONENTS_DIR}/dbus/src/dbus_message.cc
+ ${COMPONENTS_DIR}/dbus/src/dbus_message_controller.cc
+ ${COMPONENTS_DIR}/dbus/src/schema.cc
)
set (LIBRARIES dbus-1 -L${DBUS_LIBS_DIRECTORY})
@@ -54,20 +52,20 @@ set (LIBRARIES dbus-1 -L${DBUS_LIBS_DIRECTORY})
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/message_descriptions.cc
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_message_descriptions.py
- --infile ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
+ COMMAND python ${COMPONENTS_DIR}/dbus/codegen/make_message_descriptions.py
+ --infile ${COMPONENTS_DIR}/interfaces/QT_HMI_API.xml
--outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_message_descriptions.py
+ DEPENDS ${COMPONENTS_DIR}/interfaces/QT_HMI_API.xml
+ ${COMPONENTS_DIR}/dbus/codegen/make_message_descriptions.py
)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/introspection_xml.cc
- COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_introspection_c.py
- --infile ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
+ COMMAND python ${COMPONENTS_DIR}/dbus/codegen/make_introspection_c.py
+ --infile ${COMPONENTS_DIR}/interfaces/QT_HMI_API.xml
--outdir ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/QT_HMI_API.xml
- ${CMAKE_CURRENT_SOURCE_DIR}/codegen/make_introspection_c.py
+ DEPENDS ${COMPONENTS_DIR}/interfaces/QT_HMI_API.xml
+ ${COMPONENTS_DIR}/dbus/codegen/make_introspection_c.py
)
add_library("DBus" ${SOURCES})
diff --git a/src/components/formatters/CMakeLists.txt b/src/components/formatters/CMakeLists.txt
index 1858342ff3..179bd4e7d5 100644
--- a/src/components/formatters/CMakeLists.txt
+++ b/src/components/formatters/CMakeLists.txt
@@ -32,13 +32,12 @@
set(FORMATTERS_SRC_DIR ${COMPONENTS_DIR}/formatters/src)
include_directories (
- include/
+ ${COMPONENTS_DIR}/formatters/include/
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/utils/include/
${JSONCPP_INCLUDE_DIRECTORY}
${MESSAGE_BROKER_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}/smart_objects/include
- ${COMPONENTS_DIR}/utils/include
)
set (SOURCES
@@ -54,9 +53,7 @@ set (FORMATTER_SOURCES
${FORMATTERS_SRC_DIR}/generic_json_formatter.cc
)
-add_library("formatters" ${SOURCES}
- ${FORMATTER_SOURCES}
-)
+add_library("formatters" ${SOURCES} ${FORMATTER_SOURCES})
if(BUILD_TESTS)
add_subdirectory(test)
diff --git a/src/components/formatters/test/CMakeLists.txt b/src/components/formatters/test/CMakeLists.txt
index d245626dae..60d5fcf411 100644
--- a/src/components/formatters/test/CMakeLists.txt
+++ b/src/components/formatters/test/CMakeLists.txt
@@ -36,7 +36,7 @@ include_directories(
${COMPONENTS_DIR}/smart_objects/include
${COMPONENTS_DIR}/formatters/include
${COMPONENTS_DIR}/formatters/test/include
- ${CMAKE_BINARY_DIR}/src/components/interfaces
+ ${CMAKE_BINARY_DIR}/src/components
${JSONCPP_INCLUDE_DIRECTORY}
)
diff --git a/src/components/hmi_message_handler/CMakeLists.txt b/src/components/hmi_message_handler/CMakeLists.txt
index aa10729458..3ac4a6eb64 100644
--- a/src/components/hmi_message_handler/CMakeLists.txt
+++ b/src/components/hmi_message_handler/CMakeLists.txt
@@ -30,7 +30,7 @@
include_directories (
- include/
+ ${COMPONENTS_DIR}/hmi_message_handler/include/
${COMPONENTS_DIR}/application_manager/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/smart_objects/include/
@@ -39,15 +39,13 @@ include_directories (
${COMPONENTS_DIR}/protocol_handler/include
${JSONCPP_INCLUDE_DIRECTORY}
${MESSAGE_BROKER_INCLUDE_DIRECTORY}
- ${COMPONENTS_DIR}
${CMAKE_BINARY_DIR}/src/components/
${COMPONENTS_DIR}/dbus/include/
- ${CMAKE_SOURCE_DIR}/
${LOG4CXX_INCLUDE_DIRECTORY}
)
IF (HMIADAPTER STREQUAL "dbus")
- set (DBUS_SOURCE ./src/dbus_message_adapter.cc)
+ set (DBUS_SOURCE ${COMPONENTS_DIR}/hmi_message_handler/src/dbus_message_adapter.cc)
set (DBUS_ADAPTER DBus)
ENDIF ()
diff --git a/src/components/media_manager/CMakeLists.txt b/src/components/media_manager/CMakeLists.txt
index 69af6e7841..a09c5234ef 100644
--- a/src/components/media_manager/CMakeLists.txt
+++ b/src/components/media_manager/CMakeLists.txt
@@ -82,9 +82,7 @@ set(LIBRARIES
endif()
include_directories (
- include
- ${COMPONENTS_DIR}/media_manager/include/audio/
- ${COMPONENTS_DIR}/media_manager/include/video/
+ ${COMPONENTS_DIR}/media_manager/include
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/connection_handler/include/
diff --git a/src/components/policy/CMakeLists.txt b/src/components/policy/CMakeLists.txt
index 3a2b0829dc..5d949e0e7b 100644
--- a/src/components/policy/CMakeLists.txt
+++ b/src/components/policy/CMakeLists.txt
@@ -77,10 +77,10 @@ add_library(UsageStatistics ${USAGE_STATISTICS_SOURCES})
set(LIBRARIES ConfigProfile policy_struct dbms jsoncpp Utils)
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
# --- QDB Wrapper
- include_directories (${COMPONENTS_DIR}/utils/include/utils)
+ include_directories (${COMPONENTS_DIR}/utils/include/)
else ()
# --- SQLite Wrapper
- include_directories (${COMPONENTS_DIR}/utils/include/utils)
+ include_directories (${COMPONENTS_DIR}/utils/include/)
list(APPEND LIBRARIES sqlite3)
endif ()
diff --git a/src/components/policy/test/CMakeLists.txt b/src/components/policy/test/CMakeLists.txt
index 95a61f92ff..080069d472 100644
--- a/src/components/policy/test/CMakeLists.txt
+++ b/src/components/policy/test/CMakeLists.txt
@@ -29,8 +29,6 @@
# POSSIBILITY OF SUCH DAMAGE.
include_directories(
- include
- ${COMPONENTS_DIR}
${GMOCK_INCLUDE_DIRECTORY}
${JSONCPP_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}/policy/include
@@ -48,15 +46,15 @@ set(testLibraries
)
set(testSources
- counter_test.cc
- shared_library_test.cc
- generated_code_test.cc
- policy_manager_impl_test.cc
- update_status_manager_test.cc
+ ${COMPONENTS_DIR}/policy/test/counter_test.cc
+ ${COMPONENTS_DIR}/policy/test/shared_library_test.cc
+ ${COMPONENTS_DIR}/policy/test/generated_code_test.cc
+ ${COMPONENTS_DIR}/policy/test/policy_manager_impl_test.cc
+ ${COMPONENTS_DIR}/policy/test/update_status_manager_test.cc
)
list (APPEND testSources
- sql_pt_representation_test.cc
+ ${COMPONENTS_DIR}/policy/test/sql_pt_representation_test.cc
)
create_test("policy_test" "${testSources}" "${testLibraries}")
diff --git a/src/components/protocol/CMakeLists.txt b/src/components/protocol/CMakeLists.txt
index 8524ff4f44..35b0167a46 100644
--- a/src/components/protocol/CMakeLists.txt
+++ b/src/components/protocol/CMakeLists.txt
@@ -30,7 +30,6 @@
include_directories(
- ./include
${APR_INCLUDE_DIRECTORY}
)
diff --git a/src/components/protocol_handler/CMakeLists.txt b/src/components/protocol_handler/CMakeLists.txt
index a09a565844..d41e6cb899 100644
--- a/src/components/protocol_handler/CMakeLists.txt
+++ b/src/components/protocol_handler/CMakeLists.txt
@@ -30,7 +30,6 @@
include_directories(
- include
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/connection_handler/include/
diff --git a/src/components/protocol_handler/test/CMakeLists.txt b/src/components/protocol_handler/test/CMakeLists.txt
index 87d91bfd54..23c3900899 100644
--- a/src/components/protocol_handler/test/CMakeLists.txt
+++ b/src/components/protocol_handler/test/CMakeLists.txt
@@ -31,12 +31,10 @@
if (BUILD_TESTS)
include_directories (
- include
${COMPONENTS_DIR}/resumption/include
${GMOCK_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}/protocol_handler/include
${COMPONENTS_DIR}/protocol_handler/test/include
- ${COMPONENTS_DIR}/include/protocol
${JSONCPP_INCLUDE_DIRECTORY}
)
@@ -50,12 +48,12 @@ set (LIBRARIES
)
set (SOURCES
- incoming_data_handler_test.cc
- protocol_header_validator_test.cc
- protocol_handler_tm_test.cc
- protocol_packet_test.cc
- protocol_payload_test.cc
- multiframe_builder_test.cc
+ ${COMPONENTS_DIR}/protocol_handler/test/incoming_data_handler_test.cc
+ ${COMPONENTS_DIR}/protocol_handler/test/protocol_header_validator_test.cc
+ ${COMPONENTS_DIR}/protocol_handler/test/protocol_handler_tm_test.cc
+ ${COMPONENTS_DIR}/protocol_handler/test/protocol_packet_test.cc
+ ${COMPONENTS_DIR}/protocol_handler/test/protocol_payload_test.cc
+ ${COMPONENTS_DIR}/protocol_handler/test/multiframe_builder_test.cc
)
create_test ("protocol_handler_test" "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/resumption/CMakeLists.txt b/src/components/resumption/CMakeLists.txt
index b8fa277cae..badf179f6d 100644
--- a/src/components/resumption/CMakeLists.txt
+++ b/src/components/resumption/CMakeLists.txt
@@ -30,7 +30,7 @@
include_directories (
- include
+ ${COMPONENTS_DIR}/resumption/include
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/config_profile/include/
${JSONCPP_INCLUDE_DIRECTORY}
diff --git a/src/components/resumption/test/CMakeLists.txt b/src/components/resumption/test/CMakeLists.txt
index 6fa1c07381..033abf7bda 100644
--- a/src/components/resumption/test/CMakeLists.txt
+++ b/src/components/resumption/test/CMakeLists.txt
@@ -36,9 +36,7 @@ include_directories(
${COMPONENTS_DIR}/utils/include
${COMPONENTS_DIR}/resumption/include
${COMPONENTS_DIR}/config_profile/include
- ${COMPONENTS_DIR}/include
${JSONCPP_INCLUDE_DIRECTORY}
- ${CMAKE_BINARY_DIR}
)
set(LIBRARIES
@@ -54,9 +52,6 @@ set(SOURCES
${COMPONENTS_DIR}/resumption/test/last_state_test.cc
)
-#file(COPY smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-#file(COPY app_info.dat DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-
create_test("resumption_test" "${SOURCES}" "${LIBRARIES}")
endif()
diff --git a/src/components/rpc_base/CMakeLists.txt b/src/components/rpc_base/CMakeLists.txt
index 94e67cc985..d7b09ddfcf 100644
--- a/src/components/rpc_base/CMakeLists.txt
+++ b/src/components/rpc_base/CMakeLists.txt
@@ -32,7 +32,7 @@
set(RPC_BASE_INCLUDE_DIR ${COMPONENTS_DIR}/rpc_base/include)
include_directories(
- include
+ ${RPC_BASE_INCLUDE_DIR}
${JSONCPP_INCLUDE_DIRECTORY}
)
@@ -40,19 +40,9 @@ set (SOURCES
${COMPONENTS_DIR}/rpc_base/src/rpc_base/rpc_base.cc
)
-set (HEADERS
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/gtest_support.h
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/rpc_base_dbus_inl.h
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/rpc_base.h
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/rpc_base_inl.h
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/rpc_base_json_inl.h
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/rpc_message.h
- ${RPC_BASE_INCLUDE_DIR}/rpc_base/validation_report.h
-)
-
-add_library(rpc_base ${HEADERS} ${SOURCES})
+add_library(rpc_base ${SOURCES})
target_link_libraries(rpc_base jsoncpp)
if(BUILD_TESTS)
add_subdirectory(test)
-endif() \ No newline at end of file
+endif()
diff --git a/src/components/rpc_base/test/CMakeLists.txt b/src/components/rpc_base/test/CMakeLists.txt
index 76cf738f46..cf6334d0bf 100644
--- a/src/components/rpc_base/test/CMakeLists.txt
+++ b/src/components/rpc_base/test/CMakeLists.txt
@@ -31,9 +31,8 @@
if (BUILD_TESTS)
include_directories (
${COMPONENTS_DIR}/dbus/include
- ${COMPONENTS_DIR}/dbus/src
${COMPONENTS_DIR}/rpc_base/include
- ${CMAKE_SOURCE_DIR}/src/3rd_party/dbus-1.7.8
+ ${DBUS_INCLUDE_DIRS}
${GMOCK_INCLUDE_DIRECTORY}
${JSONCPP_INCLUDE_DIRECTORY}
)
@@ -44,16 +43,16 @@ set(LIBRARIES
)
set(SOURCES
- rpc_base_json_test.cc
- rpc_base_test.cc
- validation_report_test.cc
+ ${COMPONENTS_DIR}/rpc_base/test/rpc_base_json_test.cc
+ ${COMPONENTS_DIR}/rpc_base/test/rpc_base_test.cc
+ ${COMPONENTS_DIR}/rpc_base/test/validation_report_test.cc
)
if (${HMI_DBUS_API})
# Build dbus tests
include_directories(${DBUS_INCLUDE_DIRS})
set (LIBRARIES ${LIBRARIES} DBus)
- set (SOURCES ${SOURCES} rpc_base_dbus_test.cc)
+ set (SOURCES ${SOURCES} ${COMPONENTS_DIR}/rpc_base/test/rpc_base_dbus_test.cc)
endif ()
create_test("rpc_base_test" "${SOURCES}" "${LIBRARIES}")
diff --git a/src/components/security_manager/CMakeLists.txt b/src/components/security_manager/CMakeLists.txt
index 3cc6178931..04be24b9bd 100644
--- a/src/components/security_manager/CMakeLists.txt
+++ b/src/components/security_manager/CMakeLists.txt
@@ -30,14 +30,13 @@
include_directories(
- include/
+ ${COMPONENTS_DIR}/security_manager/include/
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/connection_handler/include
${COMPONENTS_DIR}/config_profile/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/application_manager/include/
${JSONCPP_INCLUDE_DIRECTORY}
- ${CMAKE_SOURCE_DIR}/src/thirdPartyLibs/jsoncpp/include
${APR_INCLUDE_DIRECTORY}
)
diff --git a/src/components/smart_objects/CMakeLists.txt b/src/components/smart_objects/CMakeLists.txt
index c1d599db67..b1783babb7 100644
--- a/src/components/smart_objects/CMakeLists.txt
+++ b/src/components/smart_objects/CMakeLists.txt
@@ -32,7 +32,7 @@
set(SMART_OBJECTS_SRC_DIR ${COMPONENTS_DIR}/smart_objects/src)
include_directories (
- include
+ ${COMPONENTS_DIR}/smart_objects/include
${COMPONENTS_DIR}/utils/include/
)
diff --git a/src/components/smart_objects/test/CMakeLists.txt b/src/components/smart_objects/test/CMakeLists.txt
index e8bc20b6b8..3a548a4512 100644
--- a/src/components/smart_objects/test/CMakeLists.txt
+++ b/src/components/smart_objects/test/CMakeLists.txt
@@ -29,7 +29,6 @@
# POSSIBILITY OF SUCH DAMAGE.
if(BUILD_TESTS)
-add_definitions(-DUNIT_TESTS)
include_directories (
${GMOCK_INCLUDE_DIRECTORY}
diff --git a/src/components/telemetry_monitor/CMakeLists.txt b/src/components/telemetry_monitor/CMakeLists.txt
index f3004dc61e..650d45c235 100644
--- a/src/components/telemetry_monitor/CMakeLists.txt
+++ b/src/components/telemetry_monitor/CMakeLists.txt
@@ -32,7 +32,7 @@
set(TELEMETRY_MONITOR_SRC_DIR ${COMPONENTS_DIR}/telemetry_monitor/src)
include_directories (
- include
+ ${COMPONENTS_DIR}/telemetry_monitor/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/protocol_handler/include/
${COMPONENTS_DIR}/connection_handler/include/
diff --git a/src/components/telemetry_monitor/test/CMakeLists.txt b/src/components/telemetry_monitor/test/CMakeLists.txt
index 7d2de19854..866cb3abd3 100644
--- a/src/components/telemetry_monitor/test/CMakeLists.txt
+++ b/src/components/telemetry_monitor/test/CMakeLists.txt
@@ -30,8 +30,10 @@
if(BUILD_TESTS)
+set(TELEMETRY_MONITOR_TEST_DIR ${COMPONENTS_DIR}/telemetry_monitor/test)
+
include_directories(
- include
+ ${TELEMETRY_MONITOR_TEST_DIR}/include
${GMOCK_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}/telemetry_monitor/include
${COMPONENTS_DIR}/utils/include
@@ -43,14 +45,14 @@ include_directories(
set(testSources
- metric_wrapper_test.cc
- telemetry_monitor_test.cc
- protocol_handler_metric_test.cc
- protocol_handler_observer_test.cc
- transport_manager_metric_test.cc
- transport_manager_observer_test.cc
- application_manager_metric_test.cc
- application_manager_observer_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/metric_wrapper_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/telemetry_monitor_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/protocol_handler_metric_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/protocol_handler_observer_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/transport_manager_metric_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/transport_manager_observer_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/application_manager_metric_test.cc
+ ${TELEMETRY_MONITOR_TEST_DIR}/application_manager_observer_test.cc
)
set(testLibraries
@@ -82,7 +84,7 @@ if (BUILD_BT_SUPPORT)
list(APPEND testLibraries bluetooth)
endif()
-file(COPY log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${TELEMETRY_MONITOR_TEST_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
create_test("telemetry_monitor_test" "${testSources}" "${testLibraries}")
diff --git a/src/components/transport_manager/CMakeLists.txt b/src/components/transport_manager/CMakeLists.txt
index fbe6018d6a..ef953883a0 100644
--- a/src/components/transport_manager/CMakeLists.txt
+++ b/src/components/transport_manager/CMakeLists.txt
@@ -32,7 +32,7 @@ set(target TransportManager)
set(TM_SRC_DIR ${COMPONENTS_DIR}/transport_manager/src)
include_directories (
- include
+ ${COMPONENTS_DIR}/transport_manager/include/
${COMPONENTS_DIR}/utils/include/
${COMPONENTS_DIR}/protocol_handler/include
${COMPONENTS_DIR}/connection_handler/include
@@ -42,10 +42,6 @@ include_directories (
${LIBUSB_INCLUDE_DIRECTORY}
${LOG4CXX_INCLUDE_DIRECTORY}
)
-if (BUILD_BT_SUPPORT)
- include_directories(
- )
-endif()
set (SOURCES
${TM_SRC_DIR}/transport_manager_impl.cc
@@ -91,10 +87,6 @@ if (BUILD_USB_SUPPORT)
endif()
endif(BUILD_USB_SUPPORT)
-
-if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
-endif()
-
add_library(${target} ${SOURCES})
target_link_libraries(${target} ProtocolLibrary)
@@ -112,12 +104,7 @@ if (BUILD_BT_SUPPORT)
target_link_libraries(${target} bluetooth)
endif()
-if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
-endif()
-
-add_library("transport_manager" ${SOURCES}
- ${TRANSPORT_MANAGER_SOURCES}
-)
+add_library("transport_manager" ${SOURCES} ${TRANSPORT_MANAGER_SOURCES})
if(BUILD_TESTS)
add_subdirectory(test)
diff --git a/src/components/transport_manager/test/CMakeLists.txt b/src/components/transport_manager/test/CMakeLists.txt
index 4b4c33c0a9..5b3bc1c3f3 100644
--- a/src/components/transport_manager/test/CMakeLists.txt
+++ b/src/components/transport_manager/test/CMakeLists.txt
@@ -32,7 +32,7 @@ if(BUILD_TESTS)
set(TM_TEST_DIR ${COMPONENTS_DIR}/transport_manager/test)
include_directories(
- include
+ ${TM_TEST_DIR}/include
${LOG4CXX_INCLUDE_DIRECTORY}
${GMOCK_INCLUDE_DIRECTORY}
${COMPONENTS_DIR}/smart_objects/include
@@ -72,5 +72,5 @@ set(SOURCES
)
create_test("transport_manager_test" "${SOURCES}" "${LIBRARIES}")
-file(COPY smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${TM_TEST_DIR}/smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()
diff --git a/src/components/utils/CMakeLists.txt b/src/components/utils/CMakeLists.txt
index f72d43e546..3538065212 100644
--- a/src/components/utils/CMakeLists.txt
+++ b/src/components/utils/CMakeLists.txt
@@ -72,25 +72,21 @@ if(ENABLE_LOG)
endif()
if (BUILD_BACKTRACE_SUPPORT)
- list(APPEND SOURCES
- ${UTILS_SRC_DIR}/back_trace.cc
- )
+ list(APPEND SOURCES ${UTILS_SRC_DIR}/back_trace.cc)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- list(APPEND SOURCES
- ${UTILS_SRC_DIR}/threads/pulse_thread_delegate.cc
- )
+ list(APPEND SOURCES ${UTILS_SRC_DIR}/threads/pulse_thread_delegate.cc)
endif()
add_library("Utils" ${SOURCES})
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
# --- QDB Wrapper
- add_subdirectory(./src/qdb_wrapper)
+ add_subdirectory(${UTILS_SRC_DIR}/qdb_wrapper)
else ()
# --- SQLite Wrapper
- add_subdirectory(./src/sqlite_wrapper)
+ add_subdirectory(${UTILS_SRC_DIR}/sqlite_wrapper)
endif ()
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
diff --git a/src/components/utils/src/qdb_wrapper/CMakeLists.txt b/src/components/utils/src/qdb_wrapper/CMakeLists.txt
index c19321568e..6a10c3aa10 100644
--- a/src/components/utils/src/qdb_wrapper/CMakeLists.txt
+++ b/src/components/utils/src/qdb_wrapper/CMakeLists.txt
@@ -29,26 +29,27 @@
# POSSIBILITY OF SUCH DAMAGE.
set(target dbms)
+set(QDB_SRC_DIR ${COMPONENTS_DIR}/utils/src/qdb_wrapper)
-include_directories(${COMPONENTS_DIR}/utils/include/utils)
+include_directories(${COMPONENTS_DIR}/utils/include/)
set(SOURCES
- ./sql_database.cc
- ./sql_query.cc
- ./sql_error.cc
+ ${QDB_SRC_DIR}/sql_database.cc
+ ${QDB_SRC_DIR}/sql_query.cc
+ ${QDB_SRC_DIR}/sql_error.cc
)
add_library(${target} ${SOURCES})
target_link_libraries(${target} qdb Utils)
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/policy.ini DESTINATION ${CMAKE_BINARY_DIR}/src/appMain)
- file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/qdbserver.sh DESTINATION ${CMAKE_BINARY_DIR}/src/appMain)
+ file(COPY ${QDB_SRC_DIR}/policy.ini DESTINATION ${CMAKE_BINARY_DIR}/src/appMain)
+ file(COPY ${QDB_SRC_DIR}/qdbserver.sh DESTINATION ${CMAKE_BINARY_DIR}/src/appMain)
endif ()
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
- install(FILES policy.ini DESTINATION bin)
- install(FILES qdbserver.sh DESTINATION bin
+ install(FILES ${QDB_SRC_DIR}/policy.ini DESTINATION bin)
+ install(FILES ${QDB_SRC_DIR}/qdbserver.sh DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif ()
diff --git a/src/components/utils/src/sqlite_wrapper/CMakeLists.txt b/src/components/utils/src/sqlite_wrapper/CMakeLists.txt
index 9a3f3cdd0f..fe5159de0e 100644
--- a/src/components/utils/src/sqlite_wrapper/CMakeLists.txt
+++ b/src/components/utils/src/sqlite_wrapper/CMakeLists.txt
@@ -29,15 +29,16 @@
# POSSIBILITY OF SUCH DAMAGE.
set(target dbms)
+set(SQLITE_SRC_DIR ${COMPONENTS_DIR}/utils/src/sqlite_wrapper)
find_package(Sqlite3 REQUIRED)
-include_directories(${COMPONENTS_DIR}/utils/include/utils)
+include_directories(${COMPONENTS_DIR}/utils/include/)
set(SOURCES
- ./sql_database.cc
- ./sql_query.cc
- ./sql_error.cc
+ ${SQLITE_SRC_DIR}/sql_database.cc
+ ${SQLITE_SRC_DIR}/sql_query.cc
+ ${SQLITE_SRC_DIR}/sql_error.cc
)
add_library(${target} ${SOURCES})
diff --git a/src/components/utils/test/CMakeLists.txt b/src/components/utils/test/CMakeLists.txt
index 6ec12a17e6..68a8981547 100644
--- a/src/components/utils/test/CMakeLists.txt
+++ b/src/components/utils/test/CMakeLists.txt
@@ -30,6 +30,8 @@
if(BUILD_TESTS)
+set(UTILS_TEST_DIR ${COMPONENTS_DIR}/utils/test)
+
include_directories (
${JSONCPP_INCLUDE_DIRECTORY}
${GMOCK_INCLUDE_DIRECTORY}
@@ -40,29 +42,29 @@ include_directories (
)
set(testSources
- messagemeter_test.cc
- file_system_test.cc
- date_time_test.cc
- system_test.cc
- thread_validator_test.cc
- conditional_variable_test.cc
- message_queue_test.cc
- resource_usage_test.cc
- bitstream_test.cc
- prioritized_queue_test.cc
- data_accessor_test.cc
- lock_posix_test.cc
- singleton_test.cc
- #posix_thread_test.cc
- stl_utils_test.cc
- rwlock_posix_test.cc
- async_runner_test.cc
- shared_ptr_test.cc
- scope_guard_test.cc
- atomic_object_test.cc
- message_loop_thread_test.cc
- custom_string_test.cc
- timer_test.cc
+ ${UTILS_TEST_DIR}/messagemeter_test.cc
+ ${UTILS_TEST_DIR}/file_system_test.cc
+ ${UTILS_TEST_DIR}/date_time_test.cc
+ ${UTILS_TEST_DIR}/system_test.cc
+ ${UTILS_TEST_DIR}/thread_validator_test.cc
+ ${UTILS_TEST_DIR}/conditional_variable_test.cc
+ ${UTILS_TEST_DIR}/message_queue_test.cc
+ ${UTILS_TEST_DIR}/resource_usage_test.cc
+ ${UTILS_TEST_DIR}/bitstream_test.cc
+ ${UTILS_TEST_DIR}/prioritized_queue_test.cc
+ ${UTILS_TEST_DIR}/data_accessor_test.cc
+ ${UTILS_TEST_DIR}/lock_posix_test.cc
+ ${UTILS_TEST_DIR}/singleton_test.cc
+# ${UTILS_TEST_DIR}/posix_thread_test.cc
+ ${UTILS_TEST_DIR}/stl_utils_test.cc
+ ${UTILS_TEST_DIR}/rwlock_posix_test.cc
+ ${UTILS_TEST_DIR}/async_runner_test.cc
+ ${UTILS_TEST_DIR}/shared_ptr_test.cc
+ ${UTILS_TEST_DIR}/scope_guard_test.cc
+ ${UTILS_TEST_DIR}/atomic_object_test.cc
+ ${UTILS_TEST_DIR}/message_loop_thread_test.cc
+ ${UTILS_TEST_DIR}/custom_string_test.cc
+ ${UTILS_TEST_DIR}/timer_test.cc
)
set(testLibraries
@@ -75,35 +77,35 @@ set(testLibraries
if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
# --- Tests for QDB Wrapper
list (APPEND testSources
- ./qdb_wrapper/sql_database_test.cc
- ./qdb_wrapper/sql_query_test.cc
+ ${UTILS_TEST_DIR}/qdb_wrapper/sql_database_test.cc
+ ${UTILS_TEST_DIR}/qdb_wrapper/sql_query_test.cc
)
- file(COPY qdbserver.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
- file(COPY test-qdb.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
- file(COPY policy.sql DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ file(COPY ${UTILS_TEST_DIR}/qdbserver.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ file(COPY ${UTILS_TEST_DIR}/test-qdb.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+ file(COPY ${UTILS_TEST_DIR}/policy.sql DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
else ()
# --- Tests for SQLite Wrapper
find_package(Sqlite3 REQUIRED)
list (APPEND testSources
- ./sqlite_wrapper/sql_database_test.cc
- ./sqlite_wrapper/sql_query_test.cc
- generated_code_with_sqlite_test.cc
+ ${UTILS_TEST_DIR}/sqlite_wrapper/sql_database_test.cc
+ ${UTILS_TEST_DIR}/sqlite_wrapper/sql_query_test.cc
+ ${UTILS_TEST_DIR}/generated_code_with_sqlite_test.cc
)
list (APPEND testLibraries sqlite3)
endif()
if (ENABLE_LOG)
- list(APPEND testSources auto_trace_test.cc)
- list(APPEND testSources log_message_loop_thread_test.cc)
+ list(APPEND testSources ${UTILS_TEST_DIR}/auto_trace_test.cc)
+ list(APPEND testSources ${UTILS_TEST_DIR}/log_message_loop_thread_test.cc)
endif()
if (BUILD_BACKTRACE_SUPPORT)
- list(APPEND testSources back_trace_test.cc)
+ list(APPEND testSources ${UTILS_TEST_DIR}/back_trace_test.cc)
endif()
-file(COPY testscript.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-file(COPY smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${UTILS_TEST_DIR}/testscript.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${UTILS_TEST_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+file(COPY ${UTILS_TEST_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
create_test("utils_test" "${testSources}" "${testLibraries}")