2 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET(fw_name "capi-ui-efl-util")
7 SET(CMAKE_INSTALL_PREFIX /usr)
8 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
11 INCLUDE_DIRECTORIES(${INC_DIR})
13 # required dependencies
14 SET(dependents "dlog elementary capi-base-common")
16 INCLUDE(FindPkgConfig)
17 pkg_check_modules(${fw_name} REQUIRED ${dependents})
18 FOREACH(flag ${${fw_name}_CFLAGS})
19 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
23 SET(ECORE_X "ecore-x utilX")
24 pkg_check_modules(ECORE_X ${ECORE_X})
25 FOREACH(flag ${${ECORE_X}_CFLAGS})
26 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
31 SET(deps "${deps} ecore-x utilX")
36 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
37 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
39 IF("${ARCH}" STREQUAL "arm")
40 ADD_DEFINITIONS("-DTARGET")
41 ENDIF("${ARCH}" STREQUAL "arm")
43 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
44 ADD_DEFINITIONS("-DSLP_DEBUG")
46 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
48 aux_source_directory(src SOURCES)
49 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
51 TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
53 SET_TARGET_PROPERTIES(${fw_name}
60 INSTALL(TARGETS ${fw_name} DESTINATION ${LIB_INSTALL_DIR})
62 DIRECTORY ${INC_DIR}/ DESTINATION include/ui
64 PATTERN "*_private.h" EXCLUDE
65 PATTERN "${INC_DIR}/*.h"
68 SET(PC_NAME ${fw_name})
69 SET(PC_REQUIRED ${dependents})
70 SET(PC_LDFLAGS -l${fw_name})
71 SET(PC_CFLAGS -I\${includedir}/ui)
74 capi-ui-efl-util.pc.in
75 ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
81 ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h
85 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
89 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
92 COMMENT "distribution clean"
95 -not -name config.cmake -and \(
99 -name cmake.depends -or
100 -name cmake.check_depends -or
101 -name CMakeCache.txt -or
102 -name cmake.check_cache -or
108 -name install_manifest.txt -or
111 | grep -v TC | xargs rm -rf