diff options
author | Kim Kibum <kb0929.kim@samsung.com> | 2012-07-13 11:00:48 +0900 |
---|---|---|
committer | Kim Kibum <kb0929.kim@samsung.com> | 2012-07-13 11:00:48 +0900 |
commit | 1041c2fad9c3a386fd3e7bdd3c3f6a97d25838e3 (patch) | |
tree | 4633d327918f85d5ddc810be36df66116765d684 /CMakeLists.txt | |
parent | 4786e80586a15fa1b6cfbd25e8d65810b510f0eb (diff) | |
download | drm-trusted-1041c2fad9c3a386fd3e7bdd3c3f6a97d25838e3.tar.gz drm-trusted-1041c2fad9c3a386fd3e7bdd3c3f6a97d25838e3.tar.bz2 drm-trusted-1041c2fad9c3a386fd3e7bdd3c3f6a97d25838e3.zip |
upload source
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..fb0aca4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,55 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(drm-trusted CXX)
+
+#Verbose
+#SET(CMAKE_VERBOSE_MAKEFILE ON)
+
+# Message
+#MESSAGE("FLAGS: ${CMAKE_C_FLAGS}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(LIBDIR ${PREFIX}/lib)
+SET(INCLUDEDIR ${PREFIX}/include)
+SET(VERSION 0.0.1)
+
+SET(SRCS
+ service/drm_trusted_client.cpp
+ service/drm_trusted_client_ipc.cpp
+)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+
+SET(extapi "-fvisibility=hidden")
+SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${extapi}")
+
+#SET(DEBUG "-Wall -Werror -ggdb3 -fno-omit-frame-pointer -rdynamic -fno-optimize-sibling-calls -fstack-protector-all")
+#SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${DEBUG}")
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(exppkgs REQUIRED dlog capi-base-common)
+
+FOREACH(flag ${exppkgs_CFLAGS})
+ SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}")
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} "-ldl" )
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${exppkgs_LDFLAGS})
+SET_TARGET_PROPERTIES(
+ drm-trusted
+ PROPERTIES
+ SOVERSION 0
+ VERSION 0.0.1
+)
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+ ADD_DEFINITIONS("-DTARGET")
+ MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc)
+INSTALL(FILES ${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION /usr/include/drm-trusted/)
\ No newline at end of file |