diff options
Diffstat (limited to 'native/CMakeLists.txt')
-rwxr-xr-x | native/CMakeLists.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt new file mode 100755 index 0000000..8636905 --- /dev/null +++ b/native/CMakeLists.txt @@ -0,0 +1,28 @@ +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/common) + +SET(NATIVE contacts-service3) + +FILE(GLOB SRCS *.c ../common/*.c) + +INCLUDE(FindPkgConfig) +pkg_check_modules(service_pkgs REQUIRED sqlite3 db-util capi-media-image-util badge) + +FOREACH(flag ${service_pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + +ADD_DEFINITIONS("-D_CONTACTS_NATIVE") + +ADD_LIBRARY(${NATIVE} SHARED ${SRCS}) +SET_TARGET_PROPERTIES(${NATIVE} PROPERTIES SOVERSION ${VERSION_MAJOR}) +SET_TARGET_PROPERTIES(${NATIVE} PROPERTIES VERSION ${VERSION}) +TARGET_LINK_LIBRARIES(${NATIVE} ${pkgs_LDFLAGS} ${service_pkgs_LDFLAGS} -lpthread) + +INSTALL(TARGETS ${NATIVE} DESTINATION lib) + +# Make pc file and install +CONFIGURE_FILE(${NATIVE}.pc.in ${NATIVE}.pc @ONLY) +INSTALL(FILES ${NATIVE}.pc DESTINATION lib/pkgconfig) |