tizen 2.0beta
[apps/native/ug-wifi-direct.git] / ug-wifidirect / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2 PROJECT(ug-setting-wifidirect-efl C)
3 SET(PACKAGE_NAME ug-setting-wifidirect-efl)
4
5 SET(PREFIX "/opt/ug")
6 SET(LIBDIR "${PREFIX}/lib")
7 SET(RESDIR "${PREFIX}/res")
8 SET(EDJDIR "${RESDIR}/edje/${PROJECT_NAME}") 
9 SET(IMGDIR "${RESDIR}/images/${PROJECT_NAME}") 
10
11 SET(SRCS 
12         src/wfd_ug.c
13         src/wfd_client.c
14         src/wfd_ug_popup.c
15         src/wfd_ug_genlist.c
16         src/wfd_ug_main_view.c
17         src/wfd_ug_multiconnect_view.c
18         src/wfd_ug_about_view.c
19 )
20
21 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
22
23
24 SET(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} -fvisibility=hidden -Wall")
25 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
26 SET(CMAKE_C_FLAGS_RELEASE "-O2")
27
28 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
29 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
30
31 ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
32 SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION 0.1.0)
33 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
34
35 ADD_CUSTOM_TARGET(wfd_ug.edj
36                 COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/resources/images
37                 ${CMAKE_CURRENT_SOURCE_DIR}/resources/wfd_ug.edc ${CMAKE_BINARY_DIR}/wfd_ug.edj
38                 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/resources/wfd_ug.edc
39 )
40 ADD_DEPENDENCIES(${PROJECT_NAME} wfd_ug.edj)
41
42 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${LIBDIR})
43 INSTALL(FILES ${CMAKE_BINARY_DIR}/wfd_ug.edj DESTINATION ${EDJDIR})
44 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/images/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
45
46 ADD_SUBDIRECTORY(po)