diff options
author | Ivo Stoilov (GitHub) <istoilov@luxoft.com> | 2017-01-19 18:30:52 +0200 |
---|---|---|
committer | Ivo Stoilov (GitHub) <istoilov@luxoft.com> | 2017-01-25 16:50:56 +0200 |
commit | afab4e4b363767e386a56061e4faf5c45420ad9c (patch) | |
tree | 596b537a6baa132aed2f34432220e39d4d7fa0c8 /src/components | |
parent | eb38ef6e48440e178f356960b3b08c58f2bd1e28 (diff) | |
download | sdl_core-afab4e4b363767e386a56061e4faf5c45420ad9c.tar.gz |
Update CMakeLists according rules
Related tasks APPLINK-30588 APPLINK-30974
Diffstat (limited to 'src/components')
13 files changed, 39 insertions, 91 deletions
diff --git a/src/components/application_manager/CMakeLists.txt b/src/components/application_manager/CMakeLists.txt index 088757a090..243fafab0a 100644 --- a/src/components/application_manager/CMakeLists.txt +++ b/src/components/application_manager/CMakeLists.txt @@ -43,14 +43,15 @@ include_directories ( ${COMPONENTS_DIR}/protocol_handler/include/ ${COMPONENTS_DIR}/smart_objects/include/ ${COMPONENTS_DIR}/hmi_message_handler/include - ${COMPONENTS_DIR}/media_manager/include - ${COMPONENTS_DIR}/connection_handler/include - ${COMPONENTS_DIR}/config_profile/include - ${COMPONENTS_DIR}/request_watchdog/include - ${COMPONENTS_DIR}/resumption/include - ${COMPONENTS_DIR}/rpc_base/include - ${COMPONENTS_DIR}/policy/include - ${CMAKE_BINARY_DIR}/src/components + ${COMPONENTS_DIR}/media_manager/include/ + ${COMPONENTS_DIR}/connection_handler/include/ + ${COMPONENTS_DIR}/config_profile/include/ + ${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} ${ENCRYPTION_INCLUDE_DIRECTORY} ${MESSAGE_BROKER_INCLUDE_DIRECTORY} diff --git a/src/components/application_manager/test/CMakeLists.txt b/src/components/application_manager/test/CMakeLists.txt index 15d652546f..6c6e2d7268 100644 --- a/src/components/application_manager/test/CMakeLists.txt +++ b/src/components/application_manager/test/CMakeLists.txt @@ -48,7 +48,7 @@ include_directories( ${COMPONENTS_DIR}/application_manager/test/include/ ) -set(testSources +set(SOURCES ${AM_TEST_DIR}/mobile_message_handler_test.cc ${AM_TEST_DIR}/mobile_message_handler_v1_test.cc ${AM_TEST_DIR}/request_info_test.cc @@ -64,54 +64,7 @@ set(testSources ${AM_TEST_DIR}/mock_message_helper.cc ) -set(request_controller_SOURCES - ${AM_TEST_DIR}/request_controller/request_controller_test.cc -) - -set(testLibraries - ApplicationManager - Utils - dbms - jsoncpp - Policy - connectionHandler - HMI_API - MOBILE_API - v4_protocol_v1_2_no_extra - SmartObjects - formatters - gmock_main - UsageStatistics - dl - ProtocolLibrary - ConfigProfile - MediaManager - Resumption - ProtocolHandler - SecurityManager -) - -set(test_exec_libraries - HMI_API - MOBILE_API - v4_protocol_v1_2_no_extra - SmartObjects - formatters - ProtocolHandler - connectionHandler - HMIMessageHandler - Utils - jsoncpp - ConfigProfile - MediaManager - Resumption -) - -if (${CMAKE_SYSTEM_NAME} MATCHES "QNX") - list(REMOVE_ITEM test_exec_libraries dl) -endif() - -set(testLibraries +set(LIBRARIES Utils ApplicationManager jsoncpp @@ -134,7 +87,7 @@ set(testLibraries ) if (${CMAKE_SYSTEM_NAME} MATCHES "QNX") - list(REMOVE_ITEM test_exec_libraries dl) + list(REMOVE_ITEM LIBRARIES dl) endif() if (ENABLE_LOG) @@ -151,12 +104,12 @@ file(COPY sdl_pt_update.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libPolicy.so COMMAND ${CMAKE_COMMAND} -E - copy ${COMPONENTS_DIR}/policy/libPolicy.so ${CMAKE_CURRENT_BINARY_DIR} + copy ${COMPONENTS_DIR}/policy/libPolicy.so ${CMAKE_CURRENT_BINARY_DIR} ) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath=${CMAKE_CURRENT_BINARY_DIR}" ) -create_test("application_manager_test" "${testSources}" "${testLibraries}") +create_test("application_manager_test" "${SOURCES}" "${LIBRARIES}") # TODO [AKozoriz] : Fix not buildable tests set(ResumptionData_SOURCES @@ -172,8 +125,9 @@ file(COPY smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/resumption) file(COPY smartDeviceLink_test.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/resumption) -create_test("resumption/data_resumption_test" "${ResumptionData_SOURCES}" "${testLibraries}") +create_test("resumption/data_resumption_test" "${ResumptionData_SOURCES}" "${LIBRARIES}") add_subdirectory(state_controller) add_subdirectory(app_launch) add_subdirectory(commands) +add_subdirectory(message_helper) diff --git a/src/components/application_manager/test/message_helper/CMakeLists.txt b/src/components/application_manager/test/message_helper/CMakeLists.txt index bfc0228bbb..932f3ccb04 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 2f8561fc2d..873f7ab08c 100644 --- a/src/components/config_profile/CMakeLists.txt +++ b/src/components/config_profile/CMakeLists.txt @@ -31,7 +31,7 @@ include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) include_directories ( - include + ${COMPONENTS_DIR}/config_profile/include ${COMPONENTS_DIR}/utils/include/ ${LOG4CXX_INCLUDE_DIRECTORY} ) diff --git a/src/components/formatters/test/CMakeLists.txt b/src/components/formatters/test/CMakeLists.txt index c80c3d0e40..27a0cdf791 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/protocol_handler/CMakeLists.txt b/src/components/protocol_handler/CMakeLists.txt index 559acf8956..c1dd9b2769 100644 --- a/src/components/protocol_handler/CMakeLists.txt +++ b/src/components/protocol_handler/CMakeLists.txt @@ -31,7 +31,6 @@ include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) include_directories( - include ${COMPONENTS_DIR}/utils/include/ ${COMPONENTS_DIR}/protocol_handler/include/ ${COMPONENTS_DIR}/connection_handler/include/ diff --git a/src/components/resumption/CMakeLists.txt b/src/components/resumption/CMakeLists.txt index a3034293a0..a2c93b0689 100644 --- a/src/components/resumption/CMakeLists.txt +++ b/src/components/resumption/CMakeLists.txt @@ -31,7 +31,7 @@ include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) include_directories ( - include + ${COMPONENTS_DIR}/resumption/include ${COMPONENTS_DIR}/utils/include/ ${COMPONENTS_DIR}/config_profile/include/ ${JSONCPP_INCLUDE_DIRECTORY} diff --git a/src/components/security_manager/CMakeLists.txt b/src/components/security_manager/CMakeLists.txt index b2065b1dbd..88bc1ddab4 100644 --- a/src/components/security_manager/CMakeLists.txt +++ b/src/components/security_manager/CMakeLists.txt @@ -32,14 +32,13 @@ include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) 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/telemetry_monitor/CMakeLists.txt b/src/components/telemetry_monitor/CMakeLists.txt index 5e03a979a8..8e55c338f0 100644 --- a/src/components/telemetry_monitor/CMakeLists.txt +++ b/src/components/telemetry_monitor/CMakeLists.txt @@ -31,7 +31,7 @@ include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake) 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 ea2698dfb2..107a92d614 100644 --- a/src/components/telemetry_monitor/test/CMakeLists.txt +++ b/src/components/telemetry_monitor/test/CMakeLists.txt @@ -65,15 +65,13 @@ set(LIBRARIES ) if (BUILD_USB_SUPPORT) - list(APPEND testLibraries Libusb-1.0.16) + list(APPEND LIBRARIES Libusb-1.0.16) endif() if (BUILD_BT_SUPPORT) - list(APPEND testLibraries bluetooth) + list(APPEND LIBRARIES bluetooth) endif() create_test("telemetry_monitor_test" "${SOURCES}" "${LIBRARIES}") file(COPY ${COMPONENTS_DIR}/telemetry_monitor/test/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - - 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..858d3b0283 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) 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}) |