diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 54 |
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) |