py: drop the fancy event handling
[android/external-libkmsxx.git] / py / pykms / CMakeLists.txt
1 include_directories(${LIBDRM_INCLUDE_DIRS})
2 link_directories(${LIBDRM_LIBRARY_DIRS})
4 pkg_search_module(PYTHON REQUIRED ${KMSXX_PYTHON_VERSION})
5 include_directories(${PYTHON_INCLUDE_DIRS})
7 if (NOT ${U_CMAKE_BUILD_TYPE} MATCHES DEBUG)
8     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
9 endif()
11 include_directories(${PROJECT_SOURCE_DIR}/ext/pybind11/include)
13 set(SRCS pykms.cpp pykmsbase.cpp pykmsutil.cpp pyvid.cpp)
15 if(LIBDRM_OMAP_FOUND)
16     set(SRCS ${SRCS} pykmsomap.cpp)
17 endif()
19 add_library(pykms SHARED ${SRCS})
20 target_link_libraries(pykms kms++ kms++util ${LIBDRM_LIBRARIES})
22 # Don't add a 'lib' prefix to the shared library
23 set_target_properties(pykms PROPERTIES PREFIX "")
24 set_target_properties(pykms PROPERTIES LIBRARY_OUTPUT_DIRECTORY "")
26 configure_file(__init__.py __init__.py COPYONLY)
28 set(PY_DESTDIR lib/python${PYTHON_VERSION}/site-packages/pykms)
29 install(FILES __init__.py DESTINATION ${PY_DESTDIR})
30 install(TARGETS pykms DESTINATION ${PY_DESTDIR})