1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
4 SET(LIB_NAME "lbs-location")
6 SET(MANAGER_DIR "manager")
7 SET(MODULE_DIR "module")
9 ADD_DEFINITIONS("-DLIBDIR=\"${LIBDIR}\"")
19 ${MANAGER_DIR}/location.c
20 ${MANAGER_DIR}/location-marshal.c
21 ${MANAGER_DIR}/location-ielement.c
22 ${MANAGER_DIR}/location-setting.c
23 ${MANAGER_DIR}/location-position.c
24 ${MANAGER_DIR}/location-batch.c
25 ${MANAGER_DIR}/location-velocity.c
26 ${MANAGER_DIR}/location-accuracy.c
27 ${MANAGER_DIR}/location-boundary.c
28 ${MANAGER_DIR}/location-satellite.c
29 ${MANAGER_DIR}/location-signaling-util.c
30 ${MANAGER_DIR}/location-common-util.c
31 ${MANAGER_DIR}/location-gps.c
32 ${MANAGER_DIR}/location-wps.c
33 ${MANAGER_DIR}/location-passive.c
34 ${MANAGER_DIR}/location-fused.c
35 ${MANAGER_DIR}/location-privacy.c
37 ${MODULE_DIR}/module-internal.c
41 ${MANAGER_DIR}/location-hybrid-mobile.c
45 ${INC_DIR}/location-types.h
47 ${MANAGER_DIR}/location.h
48 ${MANAGER_DIR}/location-position.h
49 ${MANAGER_DIR}/location-batch.h
50 ${MANAGER_DIR}/location-velocity.h
51 ${MANAGER_DIR}/location-accuracy.h
52 ${MANAGER_DIR}/location-boundary.h
53 ${MANAGER_DIR}/location-satellite.h
54 ${MANAGER_DIR}/location-setting.h
56 ${MODULE_DIR}/location-module.h
59 ADD_LIBRARY(${LIB_NAME} SHARED ${SRCS} ${SRCS_MOBILE})
60 TARGET_LINK_LIBRARIES(${LIB_NAME} ${pkgs_LDFLAGS} -lm)
61 SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${FULLVER} SOVERSION ${MAJORVER} CLEAN_DIRECT_OUTPUT 1)
63 IF (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${MANAGER_DIR}/location-marshal.c)
65 MESSAGE ("<<< Generating location-marshal.c >>>")
68 COMMAND glib-genmarshal --header --prefix=location ${CMAKE_CURRENT_SOURCE_DIR}/manager/location-marshal.list
69 OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/manager/location-marshal.h
73 COMMAND glib-genmarshal --body --prefix=location ${CMAKE_CURRENT_SOURCE_DIR}/manager/location-marshal.list
74 OUTPUT_VARIABLE marshal_var
78 COMMAND echo "#include \"location-marshal.h\" ${marshal_var}"
79 OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/manager/location-marshal.c
82 ENDIF (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${MANAGER_DIR}/location-marshal.c)
84 INSTALL(TARGETS ${LIB_NAME} DESTINATION ${LIBDIR} COMPONENT Runtime)
85 FOREACH(ITEM IN ITEMS ${INSTALL_HEADERS})
87 INSTALL(FILES ${ITEM} DESTINATION ${INCLUDEDIR}/${PROJECT_NAME})