1 # Copyright (c) 2013 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("file-browser" CXX C)
19 SET(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
21 IF(NOT DEFINED PACKAGE_NAME)
22 SET(PACKAGE_NAME "org.tizen.file-browser-tv-ref")
23 ENDIF(NOT DEFINED PACKAGE_NAME)
25 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
26 IF(NOT DEFINED BINDIR)
27 SET(BINDIR"${PREFIX}/bin")
28 ENDIF(NOT DEFINED BINDIR)
29 IF(NOT DEFINED RESDIR)
30 SET(RESDIR "${PREFIX}/res")
31 ENDIF(NOT DEFINED RESDIR)
32 IF(NOT DEFINED EDJEDIR)
33 SET(EDJEDIR "${PREFIX}/res/edje")
34 ENDIF(NOT DEFINED EDJEDIR)
35 IF(NOT DEFINED LOCALEDIR)
36 SET(LOCALEDIR "${PREFIX}/res/locale")
37 ENDIF(NOT DEFINED LOCALEDIR)
38 IF(NOT DEFINED IMAGEDIR)
39 SET(IMAGEDIR "${PREFIX}/res/images")
40 ENDIF(NOT DEFINED IMAGEDIR)
41 IF(NOT DEFINED MANIFESTDIR)
42 SET(MANIFESTDIR "/usr/share/packages")
43 ENDIF(NOT DEFINED MANIFESTDIR)
44 IF(NOT DEFINED DESKTOP_ICONDIR)
45 SET(DESKTOP_ICONDIR "/usr/share/icons/default/small")
46 ENDIF(NOT DEFINED DESKTOP_ICONDIR)
47 IF(NOT DEFINED DESKTOP_ICON)
48 SET(DESKTOP_ICON ${PACKAGE_NAME}.png)
49 ENDIF(NOT DEFINED DESKTOP_ICON)
50 IF(NOT DEFINED LANDSCAPE_ICON)
51 SET(LANDSCAPE_ICON ${PACKAGE_NAME}_4x2.png)
52 ENDIF(NOT DEFINED LANDSCAPE_ICON)
55 src/views/FbContextView.cpp
56 src/views/BaseView/Popup.cpp
57 src/views/BaseView/FileGrid.cpp
58 src/views/BaseView/Info.cpp
59 src/views/BaseView/FbBaseView.cpp
60 src/layouts/FbAllLayout.cpp
61 src/views/BaseView/GengridItemClass.cpp
62 src/views/BaseView/SortCtxPopup.cpp
63 src/views/BaseView/SourceCtxPopup.cpp
64 src/views/Dummy/DummyContent.cpp
65 src/data/Mediadata.cpp
66 src/data/MediadataImpl.cpp
68 src/data/DirectoryInfo.cpp
72 SET(TARGET_EDJ "${PROJECT_NAME}.edj")
73 SET(THEME_EDJ "${PROJECT_NAME}-theme.edj")
75 ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE_NAME}\"")
76 ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
77 ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
78 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
79 ADD_DEFINITIONS("-DTHEMEFILE=\"${EDJEDIR}/${THEME_EDJ}\"")
80 ADD_DEFINITIONS("-DEDJEFILE=\"${EDJEDIR}/${TARGET_EDJ}\"")
82 INCLUDE(FindPkgConfig)
83 pkg_check_modules(PKGS REQUIRED
85 capi-appfw-application
89 capi-content-media-content
93 FOREACH(flag ${PKGS_CFLAGS})
94 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
97 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror")
98 SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fvisibility=hidden -Wall -Werror")
99 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
101 ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
102 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS})
103 CONFIGURE_FILE(${PACKAGE_NAME}.xml.in ${PACKAGE_NAME}.xml)
105 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
106 INSTALL(FILES ${PACKAGE_NAME}.xml DESTINATION ${MANIFESTDIR})
107 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/images DESTINATION ${RESDIR})
108 INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/${DESKTOP_ICON} DESTINATION ${DESKTOP_ICONDIR})
109 INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/${LANDSCAPE_ICON} DESTINATION ${DESKTOP_ICONDIR})
113 ADD_SUBDIRECTORY(res/edc)