summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-09-14 22:13:00 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-09-14 22:13:00 +0900
commitc821767cc8132601c13243dd8f4cf205c8202dcb (patch)
treeba85963bd663cd02c23e81d18e63b17c8d8b1067 /CMakeLists.txt
parenta500c9b371284ba9e3ff60f76d2d3a9aed4c45ae (diff)
downloadaccount-parser-tizen_2.3.1.tar.gz
account-parser-tizen_2.3.1.tar.bz2
account-parser-tizen_2.3.1.zip
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt41
1 files changed, 41 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..57fc332
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,41 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(account C)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(account_pkgs REQUIRED
+ dlog
+ libxml-2.0
+ pkgmgr-info
+ glib-2.0
+ accounts-svc
+ capi-appfw-app-manager
+)
+
+FOREACH(flag ${account_pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET (SRCS
+ src/account.c
+)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" )
+SET(extapi "-fvisibility=hidden")
+
+## SET C COMPILER FLAGS
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${extapi}")
+
+## SET CPP COMPILER FLAGS
+#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+#SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
+
+## SET LINKER FLAGS
+SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+
+## Create Library
+ADD_LIBRARY (${PROJECT_NAME} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${account_pkgs_LDFLAGS} )
+
+#CONFIGURE_FILE(account-parser.pc.in ${CMAKE_SOURCE_DIR}/account-parser.pc @ONLY)
+#INSTALL(FILES ${CMAKE_SOURCE_DIR}/account-parser.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION "etc/package-manager/parserlib")