9 if (EXTENDED_MEDIA_MODE)
11 ${GSTREAMER_gst_INCLUDE_DIR}
13 else(EXTENDED_MEDIA_MODE)
22 v4_protocol_v1_2_no_extra
42 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
43 list(APPEND LIBRARIES pthread)
44 list(APPEND LIBRARIES dl)
48 list(APPEND LIBRARIES bluetooth)
50 if (BUILD_AVAHI_SUPPORT)
51 list(APPEND LIBRARIES avahi-client avahi-common)
53 if (BUILD_USB_SUPPORT)
55 # make link_directories() treat paths relative to the source dir
56 # info: cmake --help-policy CMP0015
57 cmake_policy(SET CMP0015 NEW)
58 link_directories(../thirdPartyLibs/libusbx)
60 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
61 list(APPEND LIBRARIES Libusb-1.0.16)
67 ../components/protocol_handler/include/
68 ../thirdPartyLibs/jsoncpp/include/
69 ../components/application_manager/include
70 ../components/formatters/include
71 ../components/transport_manager/include
72 ../components/config_profile/include
73 ../components/utils/include/
74 ../components/connection_handler/include/
75 ../components/hmi_message_handler/include
76 ../components/request_watchdog/include
77 ../components/smart_objects/include/
78 ../components/media_manager/include/
79 ${CMAKE_SOURCE_DIR}/src/components/policy/src/policy/include/
80 ../components/resumption/include/
81 ../thirdPartyLibs/MessageBroker/include
82 ../thirdPartyLibs/encryption/include
83 ${CMAKE_SOURCE_DIR}/src/components/
84 ${CMAKE_BINARY_DIR}/src/components/
85 ${CMAKE_SOURCE_DIR}/src/components/dbus/include/
95 if( NOT CMAKE_BUILD_TYPE )
96 set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build. Options are: None, Debug, Release, RelWithDebInfo, MinSizeRel." FORCE)
99 add_executable(${PROJECT} ${SOURCES})
100 target_link_libraries(${PROJECT} ${LIBRARIES})
102 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
103 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
104 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
105 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
106 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/policy_table.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
107 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/hmi_capabilities.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
108 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/sdl_preloaded_pt.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
111 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_BINARY_DIR}/test/)
112 file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_BINARY_DIR}/test/)
116 set(main_qml "hmi/MainWindow.qml")
117 set(plugins_dir "hmi/plugins")
119 if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
120 set(start_command "./start-qml.sh")
121 set(command_arguments "${main_qml} ${plugins_dir}")
124 COMMAND ${CMAKE_SOURCE_DIR}/FindQt.sh -v ${qt_version} -b qmlscene
125 OUTPUT_VARIABLE start_command
127 set(command_arguments "${main_qml} -I ${plugins_dir}")
130 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh
131 "#!/bin/sh\n${start_command} ${command_arguments}\n")
133 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hmi_link
134 "${CMAKE_HOME_DIRECTORY}/src/components/HMI/index.html")
138 install(TARGETS ${PROJECT} DESTINATION bin)
140 FILES log4cxx.properties audio.8bit.wav test.txt smartDeviceLink.ini policy_table.json
141 hmi_capabilities.json sdl_preloaded_pt.json
145 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
146 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/hmi_link DESTINATION bin)
149 if (CMAKE_SYSTEM_NAME STREQUAL "QNX")
150 install(FILES start-qml.sh DESTINATION bin
151 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
152 GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
154 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/start_hmi.sh DESTINATION bin
155 PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
156 GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)