@@ -38,7 +38,7 @@ set (HMI "web" CACHE STRING "HMI type")
38
38
option (HMI2 "Use Qt HMI" OFF )
39
39
option (EXTENDED_MEDIA_MODE "Turn on and off extended Madia Manager features relates to PulseAudio A2DP and GStreamer" OFF )
40
40
option (BUILD_SHARED_LIBS "Build all libraries as shared (if ON) or static (if OFF)" OFF )
41
- option (BUILD_BT_SUPPORT "Bluetooth support" ON )
41
+ option (BUILD_BT_SUPPORT "Bluetooth support" OFF )
42
42
option (BUILD_USB_SUPPORT "libusb support" ON )
43
43
option (BUILD_BACKTRACE_SUPPORT "backtrace support" OFF )
44
44
option (BUILD_TESTS "Possibility to build and run tests" OFF )
@@ -49,6 +49,7 @@ option(ENABLE_SANITIZE "Sanitize tool" OFF)
49
49
option (ENABLE_SECURITY "Security Ford protocol protection" OFF )
50
50
option (ENABLE_HMI_PTU_DECRYPTION "Policy table update parsed by hmi" OFF )
51
51
option (ENABLE_EXTENDED_POLICY "Turns extended flow which requires embedded system interaction" OFF )
52
+ option (FIREFLY_RK3288 "Enable cross compile for embedded system of rk3288" ON )
52
53
53
54
set (OS_TYPE_OPTION "$ENV{OS_TYPE} " )
54
55
set (DEBUG_OPTION "$ENV{DEBUG} " )
@@ -64,10 +65,14 @@ set(SECURITY_OPTION "$ENV{SECURITY_MODE}")
64
65
set (COMPONENTS_DIR ${CMAKE_SOURCE_DIR} /src/components)
65
66
set (SNAPSHOT_TAG "$ENV{SNAPSHOT_TAG} " )
66
67
67
- # Set the cross compiler
68
+ if (FIREFLY_RK3288)
68
69
set (CROSS_COMPILE_PREFIX "arm-linux-gnueabihf-" )
69
70
set (CMAKE_C_COMPILER ${CROSS_COMPILE_PREFIX} gcc)
70
71
set (CMAKE_CXX_COMPILER ${CROSS_COMPILE_PREFIX} g++)
72
+ else ()
73
+ set (CMAKE_CXX_COMPILER $ENV{CMAKE_CXX_COMPILER} )
74
+ set (CMAKE_C_COMPILER $ENV{CMAKE_C_COMPILER} )
75
+ endif ()
71
76
72
77
if (ARCH_TYPE_OPTION)
73
78
if (NOT (${ARCH_TYPE_OPTION} STREQUAL "x86" ) AND NOT (${ARCH_TYPE_OPTION} STREQUAL "armv7" ))
@@ -174,7 +179,12 @@ add_custom_target(genivi-tarball
174
179
COMMAND tar -cz -C /tmp/GENIVI -f ${CMAKE_BINARY_DIR} /genivi.tar.gz .
175
180
)
176
181
177
- set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR} /cmake/Modules/" )
182
+
183
+ project (${PROJECT} )
184
+
185
+ #ADD_DEPENDENCIES(${PROJECT} Policy)
186
+
187
+ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR} /cmake/Modules/" )
178
188
179
189
# Please do not change compiler/linker flags if You do not know how particular
180
190
# flag is handled by CMake
@@ -195,6 +205,9 @@ set(CMAKE_CXX_FLAGS_DEBUG " -DDEBUG -g3 -ggdb3")
195
205
196
206
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" )
197
207
add_definitions (-DOS_LINUX)
208
+ if (FIREFLY_RK3288)
209
+ add_definitions (-DFIREFLY_RK3288)
210
+ endif ()
198
211
elseif (CMAKE_SYSTEM_NAME STREQUAL "QNX" )
199
212
add_definitions (-DOS_QNX)
200
213
SET (BUILD_BT_SUPPORT OFF )
@@ -205,7 +218,9 @@ endif()
205
218
206
219
if (BUILD_USB_SUPPORT)
207
220
add_definitions (-DUSB_SUPPORT)
208
- #find_package(UDev REQUIRED)
221
+ if (NOT FIREFLY_RK3288)
222
+ find_package (UDev REQUIRED)
223
+ endif ()
209
224
message (STATUS "USB support is enabled" )
210
225
endif ()
211
226
@@ -375,6 +390,15 @@ if (HMIADAPTER STREQUAL "mqueue")
375
390
add_definitions (-DHMI_JSON_API)
376
391
endif ()
377
392
393
+ # --- Directory with SDL interfaces, global types and ProtocolLib component
394
+ include_directories (
395
+ ${COMPONENTS_DIR} /include
396
+ ${COMPONENTS_DIR} /protocol/include
397
+ if (BUILD_TESTS)
398
+ ${COMPONENTS_DIR} /include /test
399
+ endif ()
400
+ )
401
+
378
402
# --- 3rd party libs
379
403
INCLUDE (${CMAKE_CURRENT_SOURCE_DIR} /src/3rd_party/set_3rd_party_paths.cmake)
380
404
@@ -642,17 +666,19 @@ endif()
642
666
add_subdirectory (./src/3rd_party-static )
643
667
644
668
# --- Tools
645
- #add_subdirectory(./tools)
646
-
669
+ if (NOT FIREFLY_RK3288)
670
+ add_subdirectory (./tools)
671
+ endif ()
647
672
# --- Components
648
673
add_subdirectory (./src/components)
649
674
650
675
# --- Main application
651
676
add_subdirectory (./src/appMain)
652
677
653
678
# --- Plugins
654
- #add_subdirectory(./src/plugins)
655
-
679
+ if (NOT FIREFLY_RK3288)
680
+ add_subdirectory (./src/plugins)
681
+ endif ()
656
682
657
683
# Building tests
658
684
if (BUILD_TESTS)
0 commit comments