N_SE-34873 : fix phone appcontorl result handling
[platform/framework/native/app-controls.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
3 PROJECT(osp-app-controls)
4
5 SET(COMMON_INCLUDE_DIRS
6         /usr/include/appfw
7         /usr/include/network
8         /usr/include/osp
9         /usr/include/osp/app
10         /usr/include/osp/base
11         /usr/include/osp/io
12         /usr/include/osp/net
13         /usr/include/osp/system
14         /usr/include/osp/media
15         /usr/include/system
16         )
17      
18 SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -L/usr/lib/osp" )     
19 SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
20
21 MACRO(OSP_STRIP _target)
22     SET_TARGET_PROPERTIES(${_target}
23         PROPERTIES
24         VERSION ${FULLVER}
25         SOVERSION ${MAJORVER}
26         CLEAN_DIRECT_OUTPUT 1
27         )
28         ADD_CUSTOM_COMMAND(TARGET ${this_target}
29     POST_BUILD
30                 COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} 
31                 COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER}
32                 COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}
33     COMMENT "strip ${this_target}"
34                 )   
35 ENDMACRO(OSP_STRIP)
36
37 MACRO(EXE_STRIP _target)
38         ADD_CUSTOM_COMMAND(TARGET ${this_target}
39     POST_BUILD
40                 COMMAND ${CMAKE_STRIP} --strip-unneeded ${EXECUTABLE_OUTPUT_PATH}/${this_target}${CMAKE_EXECUTABLE_SUFFIX}
41         COMMENT "strip ${this_target}"
42         )   
43 ENDMACRO(EXE_STRIP)
44
45 ADD_SUBDIRECTORY(src/bluetooth-app-control osp-ac-bluetooth)
46 ADD_SUBDIRECTORY(src/browser-app-control osp-ac-browser)
47 ADD_SUBDIRECTORY(src/calendar-app-control osp-ac-calendar)
48 ADD_SUBDIRECTORY(src/call-app-control osp-ac-call)
49 ADD_SUBDIRECTORY(src/camera-app-control osp-ac-camera)
50 ADD_SUBDIRECTORY(src/contact-app-control osp-ac-contact)
51 ADD_SUBDIRECTORY(src/filemanager-app-control osp-ac-filemanager)
52 ADD_SUBDIRECTORY(src/media-app-control osp-ac-media)
53 ADD_SUBDIRECTORY(src/image-app-control osp-ac-image)
54 ADD_SUBDIRECTORY(src/message-app-control osp-ac-message)
55 ADD_SUBDIRECTORY(src/setting-app-control osp-ac-setting)
56 ADD_SUBDIRECTORY(src/nfc-push-ui-app-control osp-ac-nfc-push-ui)
57
58 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp 
59                                 FILES_MATCHING PATTERN "*.so*" 
60                                 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ                                          
61                                                                                 GROUP_EXECUTE GROUP_READ
62                                                                                 WORLD_EXECUTE WORLD_READ)
63 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug 
64                                 FILES_MATCHING PATTERN "*.so*" 
65                                 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ                                          
66                                                                                 GROUP_EXECUTE GROUP_READ
67                                                                                 WORLD_EXECUTE WORLD_READ)