summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorKim Kibum <kb0929.kim@samsung.com>2012-06-08 14:53:59 +0900
committerKim Kibum <kb0929.kim@samsung.com>2012-06-08 14:53:59 +0900
commit70d6527d2b138ba411d90204468826f15804d187 (patch)
tree992e3f884669755f08f0e34d07eaa6b6d9f853d1 /CMakeLists.txt
parent3e237aafb4e8396f8d1c808fc5507b2cacc4e7b6 (diff)
downloaddevice-manager-plugin-target-master.tar.gz
device-manager-plugin-target-master.tar.bz2
device-manager-plugin-target-master.zip
apply FSL(Flora Software License)HEAD2.0_alphamaster2.0alpha
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..252d12d
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,33 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(slp_devman_plugin C)
+
+SET(SRCS
+ src/device_manager_io.c
+ src/device_manager_plugin_target.c)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED devman_plugin)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT RuntimeLibraries)