1 IF (HMIADAPTER STREQUAL "messagebroker")
9 # make link_directories() treat paths relative to the source dir
10 # info: cmake --help-policy CMP0015
11 cmake_policy(SET CMP0015 NEW)
12 link_directories(../thirdPartyLibs/libusbx)
15 if (EXTENDED_MEDIA_MODE)
17 ${GSTREAMER_gst_INCLUDE_DIR}
18 ${GSTREAMER_gstconfig_INCLUDE_DIR}
20 else(EXTENDED_MEDIA_MODE)
33 v4_protocol_v1_2_no_extra
54 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
55 list(APPEND LIBRARIES pthread)
56 list(APPEND LIBRARIES dl)
60 list(APPEND LIBRARIES bluetooth)
62 if (BUILD_AVAHI_SUPPORT)
63 list(APPEND LIBRARIES avahi-client avahi-common)
65 if (BUILD_USB_SUPPORT)
66 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
67 list(APPEND LIBRARIES Libusb-1.0.16)
73 ../components/protocol_handler/include/
74 ../thirdPartyLibs/jsoncpp/include/
75 ../components/application_manager/include
76 ../components/formatters/include
77 ../components/transport_manager/include
78 ../components/config_profile/include
79 ../components/utils/include/
80 ../components/connection_handler/include/
81 ../components/hmi_message_handler/include
82 ../components/request_watchdog/include
83 ../components/smart_objects/include/
84 ../components/media_manager/include/
85 ${CMAKE_SOURCE_DIR}/src/components/time_tester/include
86 ${CMAKE_SOURCE_DIR}/src/components/policy/src/policy/include/
87 ../components/resumption/include/
88 ../thirdPartyLibs/MessageBroker/include
89 ../thirdPartyLibs/encryption/include
90 ${CMAKE_SOURCE_DIR}/src/components/
91 ${CMAKE_BINARY_DIR}/src/components/
92 ${CMAKE_SOURCE_DIR}/src/components/dbus/include/
102 if( NOT CMAKE_BUILD_TYPE )
103 set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
106 add_executable(${PROJECT} ${SOURCES})
107 target_link_libraries(${PROJECT} ${LIBRARIES})
109 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
110 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
111 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
112 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
113 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/policy_table.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
114 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
115 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
116 if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
117 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/init_policy.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
122 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_BINARY_DIR}/test/)
123 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_BINARY_DIR}/test/)
124 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_BINARY_DIR}/test/)
128 set(main_qml "hmi/MainWindow.qml")
129 set(plugins_dir "hmi/plugins")
131 if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
132 set(start_command "./start-qml.sh")
133 set(command_arguments "${main_qml} ${plugins_dir}")
136 COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} -b qmlscene
137 OUTPUT_VARIABLE start_command
139 set(command_arguments "${main_qml} -I ${plugins_dir}")
142 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh
143 "#!/bin/sh\n${start_command} ${command_arguments}\n")
145 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hmi_link
146 "${CMAKE_HOME_DIRECTORY}/src/components/HMI/index.html")
150 install(TARGETS ${PROJECT} DESTINATION bin)
152 FILES log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini policy_table.json
153 hmi_capabilities.json sdl_preloaded_pt.json
157 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
158 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hmi_link DESTINATION bin)
161 if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
162 install(FILES start-qml.sh DESTINATION bin
163 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
164 GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
166 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh DESTINATION bin
167 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
168 GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
170 if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
171 install(FILES init_policy.sh DESTINATION bin
172 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
173 GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)