summaryrefslogtreecommitdiff
path: root/src/appMain/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/appMain/CMakeLists.txt')
-rw-r--r--src/appMain/CMakeLists.txt111
1 files changed, 58 insertions, 53 deletions
diff --git a/src/appMain/CMakeLists.txt b/src/appMain/CMakeLists.txt
index a0f053fbd2..84b2c847bd 100644
--- a/src/appMain/CMakeLists.txt
+++ b/src/appMain/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2016, Ford Motor Company
+# Copyright (c) 2014, Ford Motor Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,43 +28,12 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
-include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
-
-find_package(SDLOpenSSL REQUIRED)
-
-include_directories(
- ${COMPONENTS_DIR}/protocol_handler/include
- ${COMPONENTS_DIR}/application_manager/include
- ${COMPONENTS_DIR}/formatters/include
- ${COMPONENTS_DIR}/transport_manager/include
- ${COMPONENTS_DIR}/security_manager/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}/telemetry_monitor/include
- ${COMPONENTS_DIR}/policy/include
- ${COMPONENTS_DIR}/resumption/include
- ${COMPONENTS_DIR}/dbus/include
- ${CMAKE_BINARY_DIR}/src/components
- ${JSONCPP_INCLUDE_DIRECTORY}
- ${LOG4CXX_INCLUDE_DIRECTORY}
- ${OPENSSL_INCLUDE_DIRECTORY}
- ${MESSAGE_BROKER_INCLUDE_DIRECTORY}
+IF (HMIADAPTER STREQUAL "messagebroker")
+set (BROKER_LIBRARIES
+ MessageBrokerClient
+ MessageBrokerServer
)
-
-collect_sources(SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
-
-if (HMIADAPTER STREQUAL "messagebroker")
- set (BROKER_LIBRARIES
- message_broker_client
- message_broker_server
- )
-endif()
+ENDIF ()
cmake_policy(PUSH)
# make link_directories() treat paths relative to the source dir
@@ -74,18 +43,18 @@ link_directories(${LIBUSB_LIBS_DIRECTORY})
cmake_policy(POP)
if (EXTENDED_MEDIA_MODE)
- set(default_media_inc
- ${GSTREAMER_gst_INCLUDE_DIR}
- ${GSTREAMER_gstconfig_INCLUDE_DIR}
- )
+set(default_media_inc
+${GSTREAMER_gst_INCLUDE_DIR}
+${GSTREAMER_gstconfig_INCLUDE_DIR}
+)
else(EXTENDED_MEDIA_MODE)
- set(default_media_inc)
+set(default_media_inc
+)
endif()
if (TELEMETRY_MONITOR)
- set(TELEMETRY_MONITOR_LIB
- TelemetryMonitor
- )
+ set(TELEMETRY_MONITOR_LIB
+ TelemetryMonitor)
endif()
set(LIBRARIES
@@ -104,7 +73,7 @@ set(LIBRARIES
TransportManager
${SecurityManagerLibrary}
HMIMessageHandler
- message_broker
+ MessageBroker
${BROKER_LIBRARIES}
Utils
jsoncpp
@@ -118,15 +87,12 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if (BUILD_BT_SUPPORT)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES bluetooth)
- endif()
+ list(APPEND LIBRARIES bluetooth)
endif()
-
if (BUILD_USB_SUPPORT)
- if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
- list(APPEND LIBRARIES Libusb-1.0.16)
- endif()
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ list(APPEND LIBRARIES Libusb-1.0.16)
+endif()
endif()
if(ENABLE_LOG)
@@ -136,6 +102,44 @@ if(ENABLE_LOG)
list(APPEND LIBRARIES expat -L${EXPAT_LIBS_DIRECTORY})
endif()
+include_directories (
+ ./
+ ${COMPONENTS_DIR}/protocol_handler/include/
+ ${JSONCPP_INCLUDE_DIRECTORY}
+ ${COMPONENTS_DIR}/application_manager/include
+ ${COMPONENTS_DIR}/formatters/include
+ ${COMPONENTS_DIR}/transport_manager/include
+ ${COMPONENTS_DIR}/security_manager/include
+ ${SecurityManagerIncludeDir}
+ ${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}/telemetry_monitor/include
+ ${COMPONENTS_DIR}/policy/include/
+ ${COMPONENTS_DIR}/resumption/include/
+ ${MESSAGE_BROKER_INCLUDE_DIRECTORY}
+ ${ENCRYPTION_INCLUDE_DIRECTORY}
+ ${COMPONENTS_DIR}
+ ${CMAKE_BINARY_DIR}/src/components/
+ ${COMPONENTS_DIR}/dbus/include/
+ ${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/
+)
+
+set (SOURCES
+ main.cc
+ life_cycle.cc
+ signal_handlers.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()
@@ -143,6 +147,7 @@ endif()
add_executable(${PROJECT} ${SOURCES})
target_link_libraries(${PROJECT} ${LIBRARIES})
+
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})