Merge branch 'tizen_2.2' into tizen
[platform/framework/native/uifw.git] / src / uifw / CMakeLists.txt
1 SET (this_target osp-uifw)
2
3 INCLUDE_DIRECTORIES (
4         ${SLP_INCLUDE_DIRS}
5         ${CMAKE_SOURCE_DIR}/inc
6         ${CMAKE_SOURCE_DIR}/src/app/inc
7         ${CMAKE_SOURCE_DIR}/src/graphics/inc
8         ${CMAKE_SOURCE_DIR}/src/ui
9         ${CMAKE_SOURCE_DIR}/src/ui/inc
10         ${CMAKE_SOURCE_DIR}/src/ui/controls
11         /usr/include/osp
12         /usr/include/osp/app
13         /usr/include/osp/base
14         /usr/include/osp/media
15         /usr/include/osp/system
16         )
17
18 SET (${this_target}_SOURCE_FILES
19         ${CMAKE_SOURCE_DIR}/src/app/FAppUiApp.cpp
20         ${CMAKE_SOURCE_DIR}/src/app/FApp_UiAppImpl.cpp
21         ${CMAKE_SOURCE_DIR}/src/app/FApp_AppFrame.cpp
22         ${CMAKE_SOURCE_DIR}/src/app/FApp_AppResourceBitmap.cpp
23         ${CMAKE_SOURCE_DIR}/src/app/FApp_AppResourceBitmapUtil.cpp
24         ${CMAKE_SOURCE_DIR}/src/app/FApp_CoordinateInfo.cpp
25         ${CMAKE_SOURCE_DIR}/src/app/FApp_ThemeInfo.cpp
26         )
27
28 SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -Wall" )
29
30 ## SET C COMPILER FLAGS
31 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
32
33 ## SET CPP COMPILER FLAGS
34 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
35 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
36
37 ## Create Library
38 ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
39
40 SET(STATIC_LIBS ui graphics opengl)
41
42 ADD_DEPENDENCIES(${this_target} ${STATIC_LIBS})
43
44 MACRO(OSP_ADD_OBJS_IN_ARCHIVE archives)
45     SET(LINK_OBJECTS_IN_ARCHIVE)
46     FOREACH(archive ${ARGV})
47       SET(LINK_OBJECTS_IN_ARCHIVE "${LINK_OBJECTS_IN_ARCHIVE} -l${archive}")
48     ENDFOREACH(archive)
49     SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--whole-archive ${LINK_OBJECTS_IN_ARCHIVE} -Wl,-no-whole-archive")
50 ENDMACRO(OSP_ADD_OBJS_IN_ARCHIVE)
51
52 OSP_ADD_OBJS_IN_ARCHIVE(${STATIC_LIBS})
53
54 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
55
56 TARGET_LINK_LIBRARIES( ${this_target} ${STATIC_LIBS})
57 TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
58 TARGET_LINK_LIBRARIES(${this_target} "-losp-image-core" )
59 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" )
60 TARGET_LINK_LIBRARIES(${this_target} "-lappcore-common" )
61 TARGET_LINK_LIBRARIES(${this_target} "-lappcore-efl" )
62 TARGET_LINK_LIBRARIES(${this_target} "-lappsvc" )
63 TARGET_LINK_LIBRARIES(${this_target} "-lsensor" )
64 TARGET_LINK_LIBRARIES(${this_target} "-lelementary" )
65 TARGET_LINK_LIBRARIES(${this_target} "-lX11" )
66 TARGET_LINK_LIBRARIES(${this_target} "-lXdamage" )
67 TARGET_LINK_LIBRARIES(${this_target} "-lvconf" )
68 TARGET_LINK_LIBRARIES(${this_target} "-ldlog" )
69 TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
70 TARGET_LINK_LIBRARIES(${this_target} "-lecore" )
71 TARGET_LINK_LIBRARIES(${this_target} "-levas" )
72 TARGET_LINK_LIBRARIES(${this_target} "-leina" )
73 TARGET_LINK_LIBRARIES(${this_target} "-lecore_evas" )
74 TARGET_LINK_LIBRARIES(${this_target} "-lecore_x" )
75 TARGET_LINK_LIBRARIES(${this_target} "-lecore_imf" )
76 TARGET_LINK_LIBRARIES(${this_target} "-lecore_imf_evas" )
77 TARGET_LINK_LIBRARIES(${this_target} "-lecore_input" )
78 TARGET_LINK_LIBRARIES(${this_target} "-lxml2" )
79 TARGET_LINK_LIBRARIES(${this_target} "-lfontconfig" )
80 TARGET_LINK_LIBRARIES(${this_target} "-lcairo" )
81 TARGET_LINK_LIBRARIES(${this_target} "-lpixman-1" )
82 TARGET_LINK_LIBRARIES(${this_target} "-licuuc" )
83 TARGET_LINK_LIBRARIES(${this_target} "-lpangocairo-1.0" )
84 TARGET_LINK_LIBRARIES(${this_target} "-lgobject-2.0" )
85 TARGET_LINK_LIBRARIES(${this_target} "-lpango-1.0" )
86 TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
87 TARGET_LINK_LIBRARIES(${this_target} "-lfreetype" )
88 TARGET_LINK_LIBRARIES(${this_target} "-lfribidi" )
89 TARGET_LINK_LIBRARIES(${this_target} "-lharfbuzz" )
90 TARGET_LINK_LIBRARIES(${this_target} "-ldl" )
91 TARGET_LINK_LIBRARIES(${this_target} "-lXext" )
92 TARGET_LINK_LIBRARIES(${this_target} "-lEGL" )
93 TARGET_LINK_LIBRARIES(${this_target} "-lXv" )
94 TARGET_LINK_LIBRARIES(${this_target} "-ltts" )
95 TARGET_LINK_LIBRARIES(${this_target} "-lfeedback" )
96 IF (NOT OSP_EMUL)
97 TARGET_LINK_LIBRARIES(${this_target} "-ldri2" )
98 TARGET_LINK_LIBRARIES(${this_target} "-ldrm" )
99 TARGET_LINK_LIBRARIES(${this_target} "-ltbm" )
100 ENDIF (NOT OSP_EMUL)
101 TARGET_LINK_LIBRARIES(${this_target} "-llua" )
102 TARGET_LINK_LIBRARIES(${this_target} "-ltolua++" )
103 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info")
104 TARGET_LINK_LIBRARIES(${this_target} "-lutilX" )
105 TARGET_LINK_LIBRARIES(${this_target} "-lXtst" )
106 TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
107
108 SET_TARGET_PROPERTIES(${this_target}
109                 PROPERTIES
110                 VERSION ${FULLVER}
111                 SOVERSION ${MAJORVER}
112                 CLEAN_DIRECT_OUTPUT 1
113 )
114
115 SET(PC_NAME ${this_target})
116 SET(PC_REQUIRED ${pc_requires})
117 SET(PC_LDFLAGS -l${this_target})
118
119 # pkgconfig file
120 CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)