Sync with the latest one
[platform/framework/web/livebox-viewer.git] / live.viewer / CMakeLists.txt
1 PROJECT(live-viewer C)
2 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3
4 INCLUDE(FindPkgConfig)
5 pkg_check_modules(pkgs REQUIRED
6         capi-appfw-application
7         capi-appfw-app-manager
8         ail
9         bundle
10         dlog
11         elementary
12         ecore-x
13         appcore-efl
14         livebox-viewer
15         livebox-service
16 )
17
18 FOREACH(flag ${pkgs_CFLAGS})
19         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
20 ENDFOREACH(flag)
21
22 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall -Werror -Winline -g")
23 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
24
25 SET(PKGROOT "/opt/usr/apps/live.viewer")
26 ADD_DEFINITIONS("-DNDEBUG")
27 ADD_DEFINITIONS("-DPKGROOT=\"${PKGROOT}\"")
28 #ADD_DEFINITIONS("-DFLOG")
29 ADD_DEFINITIONS("-DLOG_TAG=\"${PROJECT_NAME}\"")
30 ADD_DEFINITIONS(${pkgs_CFLAGS})
31 ADD_DEFINITIONS(${pkgs_LDFLAGS})
32
33 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
34
35 ADD_EXECUTABLE(${PROJECT_NAME}
36         src/main.c
37         src/dlist.c
38         src/live_scroller.c
39         src/util.c
40         src/scroller.c
41         src/lb.c
42 )
43
44 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
45 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${PKGROOT}/bin)
46 INSTALL(FILES ${CMAKE_SOURCE_DIR}/live.viewer.xml DESTINATION /opt/share/packages)
47
48 ADD_SUBDIRECTORY(res)