Add OmapCard and OmapFramebuffer
[android/external-libkmsxx.git] / kms++ / CMakeLists.txt
1 include_directories(${LIBDRM_INCLUDE_DIRS})
2 link_directories(${LIBDRM_LIBRARY_DIRS})
4 include_directories(${LIBDRM_OMAP_INCLUDE_DIRS})
5 link_directories(${LIBDRM_OMAP_LIBRARY_DIRS})
7 file(GLOB SRCS "src/*.cpp" "src/*.h")
8 file(GLOB PUB_HDRS "inc/kms++/*.h")
10 if(LIBDRM_OMAP_FOUND)
11     file(GLOB OMAP_SRCS "src/omap/*.cpp" "src/omap/*.h")
12     file(GLOB OMAP_PUB_HDRS "inc/kms++/omap/*.h")
14     set(SRCS ${SRCS} ${OMAP_SRCS})
15     set(PUB_HDRS ${PUB_HDRS} ${OMAP_PUB_HDRS})
16 endif()
18 add_library(kms++ ${SRCS} ${PUB_HDRS})
20 target_include_directories(kms++ PUBLIC
21     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
22     $<INSTALL_INTERFACE:include>
23     PRIVATE src)
25 target_link_libraries(kms++ ${LIBDRM_LIBRARIES} ${LIBDRM_OMAP_LIBRARIES})
27 set_target_properties(kms++ PROPERTIES
28     PUBLIC_HEADER "${PUB_HDRS}")
30 install(TARGETS kms++
31     LIBRARY DESTINATION lib
32     ARCHIVE DESTINATION lib
33     PUBLIC_HEADER DESTINATION include/kms++)