diff options
Diffstat (limited to 'src/appMain/CMakeLists.txt')
-rw-r--r-- | src/appMain/CMakeLists.txt | 121 |
1 files changed, 22 insertions, 99 deletions
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt index 7e23cdc6a0..81aac61e0b 100644 --- a/src/appMain/CMakeLists.txt +++ b/src/appMain/CMakeLists.txt @@ -55,7 +55,9 @@ if (TIME_TESTER) set(TIME_TESTER_LIB TimeTester) endif() + set(LIBRARIES + MediaManager ApplicationManager HMI_API MOBILE_API @@ -74,7 +76,6 @@ set(LIBRARIES Utils jsoncpp ConfigProfile - MediaManager Resumption ) @@ -104,32 +105,35 @@ endif() include_directories ( ./ - ${CMAKE_SOURCE_DIR}/src/components/protocol_handler/include/ + ${COMPONENTS_DIR}/protocol_handler/include/ ${JSONCPP_INCLUDE_DIRECTORY} - ${CMAKE_SOURCE_DIR}/src/components/application_manager/include - ${CMAKE_SOURCE_DIR}/src/components/formatters/include - ${CMAKE_SOURCE_DIR}/src/components/transport_manager/include + ${COMPONENTS_DIR}/application_manager/include + ${COMPONENTS_DIR}/formatters/include + ${COMPONENTS_DIR}/transport_manager/include + ${COMPONENTS_DIR}/security_manager/include ${SecurityManagerIncludeDir} - - ${CMAKE_SOURCE_DIR}/src/components/config_profile/include - ${CMAKE_SOURCE_DIR}/src/components/utils/include/ - ${CMAKE_SOURCE_DIR}/src/components/connection_handler/include/ - ${CMAKE_SOURCE_DIR}/src/components/hmi_message_handler/include - ${CMAKE_SOURCE_DIR}/src/components/request_watchdog/include - ${CMAKE_SOURCE_DIR}/src/components/smart_objects/include/ - ${CMAKE_SOURCE_DIR}/src/components/media_manager/include/ - ${CMAKE_SOURCE_DIR}/src/components/time_tester/include - ${CMAKE_SOURCE_DIR}/src/components/policy/src/policy/include/ - ${CMAKE_SOURCE_DIR}/src/components/resumption/include/ + ${COMPONENTS_DIR}/security_manager/include + ${COMPONENTS_DIR}/config_profile/include + ${COMPONENTS_DIR}/utils/include/ + ${COMPONENTS_DIR}/connection_handler/include/ + ${COMPONENTS_DIR}/hmi_message_handler/include + ${COMPONENTS_DIR}/request_watchdog/include + ${COMPONENTS_DIR}/smart_objects/include/ + ${COMPONENTS_DIR}/media_manager/include/ + ${COMPONENTS_DIR}/time_tester/include + ${COMPONENTS_DIR}/policy/src/policy/include/ + ${COMPONENTS_DIR}/resumption/include/ ${MESSAGE_BROKER_INCLUDE_DIRECTORY} ${ENCRYPTION_INCLUDE_DIRECTORY} - ${CMAKE_SOURCE_DIR}/src/components/ + ${COMPONENTS_DIR} ${CMAKE_BINARY_DIR}/src/components/ - ${CMAKE_SOURCE_DIR}/src/components/dbus/include/ + ${COMPONENTS_DIR}/dbus/include/ ${CMAKE_BINARY_DIR}/src/components/policy/src/policy ${CMAKE_SOURCE_DIR} ${default_media_inc} ${LOG4CXX_INCLUDE_DIRECTORY} + ${CMAKE_SOURCE_DIR}/src/3rd_party/dbus-1.7.8 + ${CMAKE_SOURCE_DIR}/src/3rd_party/dbus-1.7.8/dbus/ ) add_custom_target(gitversion @@ -149,7 +153,6 @@ set (SOURCES gitversion.cc ) - if( NOT CMAKE_BUILD_TYPE ) set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE) endif() @@ -158,84 +161,6 @@ add_executable(${PROJECT} ${SOURCES}) target_link_libraries(${PROJECT} ${LIBRARIES}) -#======================= Unit-Test section ======================= -if(BUILD_TESTS) - set (AM_TEST_DIR ${CMAKE_SOURCE_DIR}/src/components/application_manager/test) - set (AM_MOCK_DIR ${CMAKE_SOURCE_DIR}/src/components/application_manager/test/mock) - - get_property(the_include_dirs DIRECTORY "" PROPERTY INCLUDE_DIRECTORIES) - #replace include for mocking singltone - set(class_to_mock ${CMAKE_SOURCE_DIR}/src/components/application_manager/include) - list(FIND the_include_dirs ${class_to_mock} find_idx) - if(find_idx GREATER -1) - LIST_REPLACE(the_include_dirs ${find_idx} ${AM_MOCK_DIR}/include) - endif() - set_property(DIRECTORY "" PROPERTY INCLUDE_DIRECTORIES ${the_include_dirs}) - - -include_directories ( - ${CMAKE_SOURCE_DIR}/src/3rd_party-static/gmock-1.7.0/include - ${CMAKE_SOURCE_DIR}/src/3rd_party-static/gmock-1.7.0/gtest/include -) - - set(testSources - ./main_test.cc - ${CMAKE_SOURCE_DIR}/src/components/utils/test/date_time_test.cc - ${CMAKE_SOURCE_DIR}/src/components/utils/test/file_system_test.cc - ${CMAKE_SOURCE_DIR}/src/components/media_manager/test/media_adapter_impl_test.cc - ${AM_TEST_DIR}/command_impl_test.cc - ) - - set(test_exec_libraries - gmock - gtest - ConfigProfile - SmartObjects - gmock - gtest - gmock - gmock_main - ApplicationManagerTest #Mocked Singlton - HMI_API - MOBILE_API - v4_protocol_v1_2_no_extra - SmartObjects - formatters - ProtocolLibrary - ProtocolHandler - connectionHandler - HMIMessageHandler - Utils - jsoncpp - ConfigProfile - MediaManager - Resumption - ) - -if(ENABLE_LOG) - list(APPEND test_exec_libraries log4cxx -L${LOG4CXX_LIBS_DIRECTORY}) - list(APPEND test_exec_libraries apr-1 -L${APR_LIBS_DIRECTORY}) - list(APPEND test_exec_libraries aprutil-1 -L${APR_UTIL_LIBS_DIRECTORY}) - list(APPEND test_exec_libraries expat -L${EXPAT_LIBS_DIRECTORY}) -endif() - - include(${CMAKE_SOURCE_DIR}/src/components/policy/test/include.cmake) - - IF(${CMAKE_SYSTEM_NAME} MATCHES "QNX") - list(REMOVE_ITEM test_exec_libraries dl) - endif() - - add_executable(${PROJECT}_test ${testSources}) - target_link_libraries(${PROJECT}_test ${test_exec_libraries}) - - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_BINARY_DIR}/test/) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_BINARY_DIR}/test/) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_BINARY_DIR}/test/) - -endif() - -#================================================================= - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) @@ -246,8 +171,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "QNX") file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/init_policy.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) endif () - - if (${QT_HMI}) set(main_qml "hmi/MainWindow.qml") set(plugins_dir "hmi/plugins") |