summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:11:35 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 00:11:35 +0900
commitb32dea69029f492083f2b11f3a087300ddb2b9e0 (patch)
treecc97cc634e3234446670bc6c7d455bd1be5dd806 /CMakeLists.txt
parentc3875cbe2f8e945b837a76ac5f8e6d57bde940bb (diff)
downloadui-gadget-1-b32dea69029f492083f2b11f3a087300ddb2b9e0.tar.gz
ui-gadget-1-b32dea69029f492083f2b11f3a087300ddb2b9e0.tar.bz2
ui-gadget-1-b32dea69029f492083f2b11f3a087300ddb2b9e0.zip
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-xCMakeLists.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100755
index 0000000..f6a577a
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,52 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(ui-gadget-1)
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include")
+SET(VERSION_MAJOR 0)
+SET(VERSION "${VERSION_MAJOR}.1.0")
+
+SET(CMAKE_SKIP_BUILD_RPATH TRUE)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DDATAFS=\"${DATADIR}\"")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall")
+
+INCLUDE(FindPkgConfig)
+SET(SRCS src/ug.c
+ src/manager.c
+ src/module.c
+ src/engine.c)
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+
+PKG_CHECK_MODULES(PKGS REQUIRED glib-2.0 utilX bundle dlog x11 capi-appfw-application appsvc capi-appfw-app-manager elementary)
+FOREACH(flag ${PKGS_CFLAGS})
+ SET(CFLAGS "${CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CFLAGS "${CFLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/include")
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "${CFLAGS}")
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${PKGS_LDFLAGS} -ldl)
+
+CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ui-gadget-module.h DESTINATION include/ug-1)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ui-gadget-engine.h DESTINATION include/ug-1)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/ui-gadget.h DESTINATION include/ug-1)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/SLP_UI_Gadget_PG.h DESTINATION include/ug-1)
+
+ADD_SUBDIRECTORY(ug-efl-engine)
+ADD_SUBDIRECTORY(client)