summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:36:22 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:36:22 +0900
commitfce1a668c6b85ead8992e2a14b67f9c4c952c513 (patch)
tree84328dd953acfdf8b772afd1c0d2d40cb57c92cf /CMakeLists.txt
parent7a90b88840d44a673b3450067b541b78a92f3e63 (diff)
downloaddevice-manager-plugin-pinetrail-fce1a668c6b85ead8992e2a14b67f9c4c952c513.tar.gz
device-manager-plugin-pinetrail-fce1a668c6b85ead8992e2a14b67f9c4c952c513.tar.bz2
device-manager-plugin-pinetrail-fce1a668c6b85ead8992e2a14b67f9c4c952c513.zip
Tizen 2.1 base
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt54
1 files changed, 54 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..42911bd
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,54 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(device-manager-plugin-pinetrail C)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(rpkgs REQUIRED
+ vconf
+ dlog
+ devman
+ devman_plugin
+ heynoti)
+ADD_DEFINITIONS(${rpkgs_CFLAGS})
+
+SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRAINTS true)
+
+SET(SRCS
+ device_engine.c
+ device-manager-plugin-pinetrail.c)
+
+SET(HEADERS
+ device-manager-plugin-pinetrail.h)
+
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}")
+SET(DATADIR ${CMAKE_DATADIR})
+SET(VERSION 0.2.4)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g")
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
+ADD_DEFINITIONS("-DENABLE_DLOG_OUT -DSLP_DEBUG")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS} ${TARGET_SRCS})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${rpkgs_LDFLAGS} "-ldl -rdynamic")
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION})
+
+
+CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+
+FOREACH(hfile ${HEADERS})
+ INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${hfile} DESTINATION include/${PROJECT_NAME})
+ENDFOREACH(hfile)