1 # Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
17 PROJECT("music-player" CXX)
20 IF(NOT DEFINED PACKAGE_NAME)
21 SET(PACKAGE_NAME "org.tizen.music-player-tv-ref")
22 ENDIF(NOT DEFINED PACKAGE_NAME)
24 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
25 IF(NOT DEFINED BINDIR)
26 SET(BINDIR"${PREFIX}/bin")
27 ENDIF(NOT DEFINED BINDIR)
28 IF(NOT DEFINED RESDIR)
29 SET(RESDIR "${PREFIX}/res")
30 ENDIF(NOT DEFINED RESDIR)
31 IF(NOT DEFINED EDJEDIR)
32 SET(EDJEDIR "${PREFIX}/res/edje")
33 ENDIF(NOT DEFINED EDJEDIR)
34 IF(NOT DEFINED LOCALEDIR)
35 SET(LOCALEDIR "${PREFIX}/res/locale")
36 ENDIF(NOT DEFINED LOCALEDIR)
37 IF(NOT DEFINED IMAGEDIR)
38 SET(IMAGEDIR "${PREFIX}/res/images")
39 ENDIF(NOT DEFINED IMAGEDIR)
40 IF(NOT DEFINED MANIFESTDIR)
41 SET(MANIFESTDIR "/usr/share/packages")
42 ENDIF(NOT DEFINED MANIFESTDIR)
43 #IF(NOT DEFINED MEDIA_AUDIO_DIR)
44 # SET(MEDIA_AUDIO_DIR "/opt/usr/media/Sounds")
45 #ENDIF(NOT DEFINED MEDIA_AUDIO_DIR)
46 IF(NOT DEFINED DESKTOP_ICONDIR)
47 SET(DESKTOP_ICONDIR "/usr/share/icons/default/small")
48 ENDIF(NOT DEFINED DESKTOP_ICONDIR)
49 IF(NOT DEFINED DESKTOP_ICON)
50 SET(DESKTOP_ICON ${PACKAGE_NAME}.png)
51 ENDIF(NOT DEFINED DESKTOP_ICON)
52 IF(NOT DEFINED LANDSCAPE_ICON)
53 SET(LANDSCAPE_ICON ${PACKAGE_NAME}_4x2.png)
54 ENDIF(NOT DEFINED LANDSCAPE_ICON)
57 src/views/song-layout.cpp
58 src/views/album-layout.cpp
59 src/views/category-layout.cpp
60 src/views/folder-layout.cpp
61 src/views/album-songs-layout.cpp
62 src/views/entry-popup.cpp
63 src/views/base-view.cpp
64 src/views/playback-view.cpp
65 src/views/context-view.cpp
66 src/views/artist-layout.cpp
67 src/views/genre-layout.cpp
68 src/views/playlist-layout.cpp
69 src/views/HandleVolume.cpp
70 src/views/common-ui.cpp
71 src/views/ExtBaseLayout.cpp
73 src/views/SourceCtxPopup.cpp
74 src/views/SortCtxPopup.cpp
75 src/views/PlaySettingCtxPopup.cpp
76 src/views/PlayListCtxPopup.cpp
77 src/playback/playlist-mgr.cpp
78 src/playback/music-controller.cpp
79 src/playback/playback-mgr.cpp
80 src/playback/volume-control.cpp
81 src/data/mediadata.cpp
82 src/data/song_info.cpp
83 src/data/album_info.cpp
84 src/data/category_info.cpp
85 src/data/folder_info.cpp
89 SET(TARGET_EDJ "${PROJECT_NAME}.edj")
90 SET(THEME_EDJ "${PROJECT_NAME}-theme.edj")
92 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"")
93 ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
94 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
95 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
96 ADD_DEFINITIONS("-DTHEMEFILE=\"${EDJEDIR}/${THEME_EDJ}\"")
97 ADD_DEFINITIONS("-DEDJEFILE=\"${EDJEDIR}/${TARGET_EDJ}\"")
99 INCLUDE(FindPkgConfig)
100 pkg_check_modules(PKGS REQUIRED
101 capi-appfw-application
107 capi-media-sound-manager
108 capi-content-media-content
109 #capi-system-usbdevice
117 FOREACH(flag ${PKGS_CFLAGS})
118 SET(EXTRA_CFLGAS "${EXTRA_CFLGAS} ${flag}")
121 #SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLGAS} -fvisibility=hidden -Wall -Werror")
122 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLGAS} -fvisibility=hidden -Wall")
123 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
125 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
126 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS})
127 CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml)
129 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
130 INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
131 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images DESTINATION ${RESDIR})
132 INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/${DESKTOP_ICON} DESTINATION ${DESKTOP_ICONDIR})
133 INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/${LANDSCAPE_ICON} DESTINATION ${DESKTOP_ICONDIR})
134 #INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/demosongs DESTINATION ${MEDIA_AUDIO_DIR})
138 ADD_SUBDIRECTORY(res/edc)