summaryrefslogtreecommitdiff
path: root/src/components/media_manager/CMakeLists.txt
diff options
context:
space:
mode:
authorIvo Stoilov (GitHub) <istoilov@luxoft.com>2016-12-30 17:47:39 +0200
committerIvo Stoilov (GitHub) <istoilov@luxoft.com>2017-01-12 18:36:30 +0200
commit1c58e66069fe65a94234e322cd76051e0aaa30e2 (patch)
treec53ae86a4bea52ef5c75f988a4961b8f579229fd /src/components/media_manager/CMakeLists.txt
parent7063ed619c92d795a46f221fc9935a2249e65bf2 (diff)
downloadsdl_core-1c58e66069fe65a94234e322cd76051e0aaa30e2.tar.gz
Refactor CMake files
Merge components refactoring from Windows port barnch - add cmake tools - refactor protocol handler CMakeLists.txt file - refactor interfaces CMakeLists.txt file - refactor smart object CMakeLists.txt file - refactor formatters CMakeLists.txt file - refactor config profile CMakeLists.txt file - refactor policy CMakeLists.txt file - refactor resumption CMakeLists.txt file - refactor connection handler CMakeLists.txt file - refactor application manager CMakeLists.txt file - refactor security manager CMakeLists.txt file - refactor dbus CMakeLists.txt file - refactor hmi message handler CMakeLists.txt file - refactor transport manager CMakeLists.txt file - refactor utils CMakeLists.txt file - refactor components root CMakeLists.txt file - refactor utils CMakeLists.txt file - refactor components root CMakeLists.txt file - refactor media manager CMakeLists.txt file - refactor telemetry monitor CMakeLists.txt file - refactor appmain CMakeLists.txt file - refactor plugins CMakeLists.txt file - refactor 3rd party CMakeLists.txt files - create cmake helper for interface generation - refactor root CMakeLists.txt file Move cmake modules to tools Rename src/3rd_party-static/MessageBroker to message_broker Related tasks APPLINK-30588 APPLINK-30972
Diffstat (limited to 'src/components/media_manager/CMakeLists.txt')
-rw-r--r--src/components/media_manager/CMakeLists.txt119
1 files changed, 52 insertions, 67 deletions
diff --git a/src/components/media_manager/CMakeLists.txt b/src/components/media_manager/CMakeLists.txt
index 3ca02357ab..c143a7979e 100644
--- a/src/components/media_manager/CMakeLists.txt
+++ b/src/components/media_manager/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, Ford Motor Company
+# Copyright (c) 2014-2015, Ford Motor Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,63 +28,10 @@
# 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/platform.cmake)
+include(${CMAKE_SOURCE_DIR}/tools/cmake/helpers/sources.cmake)
-if (EXTENDED_MEDIA_MODE)
-find_package(Gstreamer-1.0 REQUIRED)
-find_package(Glib-2.0 REQUIRED)
-find_package(PkgConfig)
-pkg_check_modules(GLIB2 REQUIRED glib-2.0)
-add_definitions(${GLIB2_CFLAGS})
-set(default_includes
- ${GSTREAMER_gst_INCLUDE_DIR}
- ${GSTREAMER_gstconfig_INCLUDE_DIR}
- ${GLIB_glib_2_INCLUDE_DIR}
-)
-set(default_sources
- ${COMPONENTS_DIR}/media_manager/src/audio/a2dp_source_player_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/from_mic_recorder_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/from_mic_to_file_recorder_thread.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/socket_audio_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/pipe_audio_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/file_audio_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/video/socket_video_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/video/pipe_video_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/video/file_video_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/pipe_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/socket_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/file_streamer_adapter.cc
-)
-set(LIBRARIES
- ${GSTREAMER_gstreamer_LIBRARY}
- ApplicationManager
- pulse-simple
- pulse
- gobject-2.0
- glib-2.0
-)
-else(EXTENDED_MEDIA_MODE)
-set(default_includes
-)
-
-set(default_sources
- ${COMPONENTS_DIR}/media_manager/src/audio/socket_audio_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/pipe_audio_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/file_audio_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/video/socket_video_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/video/pipe_video_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/video/file_video_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/pipe_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/socket_streamer_adapter.cc
- ${COMPONENTS_DIR}/media_manager/src/file_streamer_adapter.cc
-)
-set(LIBRARIES
- ProtocolLibrary
-)
-endif()
-
-include_directories (
+include_directories(
include
${COMPONENTS_DIR}/media_manager/include/audio/
${COMPONENTS_DIR}/media_manager/include/video/
@@ -99,22 +46,60 @@ include_directories (
${JSONCPP_INCLUDE_DIRECTORY}
${CMAKE_BINARY_DIR}/src/components/
${COMPONENTS_DIR}/policy/include/
- ${default_includes}
${LOG4CXX_INCLUDE_DIRECTORY}
)
-set (SOURCES
- ${COMPONENTS_DIR}/media_manager/src/media_adapter_impl.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/from_mic_recorder_listener.cc
- ${COMPONENTS_DIR}/media_manager/src/audio/audio_stream_sender_thread.cc
- ${COMPONENTS_DIR}/media_manager/src/streamer_listener.cc
- ${COMPONENTS_DIR}/media_manager/src/media_manager_impl.cc
+set(PATHS
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/src
)
-add_library("MediaManager" ${SOURCES} ${default_sources})
+set(EXCLUDE_PATHS
+ video_stream_to_file_adapter.cc
+)
+
+set(LIBRARIES
+ ProtocolLibrary
+)
+
+if(EXTENDED_MEDIA_MODE)
+ find_package(Gstreamer-1.0 REQUIRED)
+ find_package(Glib-2.0 REQUIRED)
+ find_package(PkgConfig)
+ pkg_check_modules(GLIB2 REQUIRED glib-2.0)
+ add_definitions(${GLIB2_CFLAGS})
+
+ include_directories(
+ ${GSTREAMER_gst_INCLUDE_DIR}
+ ${GSTREAMER_gstconfig_INCLUDE_DIR}
+ ${GLIB_glib_2_INCLUDE_DIR}
+ )
+ list(APPEND EXCLUDE_PATHS
+
+ )
+ list(APPEND LIBRARIES
+ ${GSTREAMER_gstreamer_LIBRARY}
+ pulse-simple
+ pulse
+ gobject-2.0
+ glib-2.0
+ )
+else()
+ list(APPEND EXCLUDE_PATHS
+ a2dp_source_player_adapter.cc
+ from_mic_recorder_adapter.cc
+ from_mic_to_file_recorder_thread.cc
+ )
+endif()
+
+collect_sources(SOURCES "${PATHS}" "${EXCLUDE_PATHS}")
+add_library("MediaManager" ${SOURCES})
target_link_libraries("MediaManager" ${LIBRARIES})
-if(BUILD_TESTS)
- add_subdirectory(test)
+if(ENABLE_LOG)
+ target_link_libraries("MediaManager" log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
endif()
+if(BUILD_TESTS)
+ add_subdirectory(test)
+endif()