move test utils to libkmstest library
[android/external-libkmsxx.git] / py / CMakeLists.txt
1 set(SWIG_EXECUTABLE "swig3.0")
2 find_package(SWIG 3.0 REQUIRED)
3 include(${SWIG_USE_FILE})
5 include_directories(${LIBDRM_INCLUDE_DIRS})
6 link_directories(${LIBDRM_LIBRARY_DIRS})
8 pkg_check_modules(PYTHON python-3.4 REQUIRED)
9 include_directories(${PYTHON_INCLUDE_DIRS})
11 # XXX how to add these inc dirs in a proper way?
12 include_directories(../libkms++ ../libkmstest)
14 #set(CMAKE_SWIG_FLAGS "-I../../libkms")
16 set_source_files_properties(pykms.i PROPERTIES CPLUSPLUS ON)
17 swig_add_module(pykms python pykms.i)
18 swig_link_libraries(pykms kms++ kmstest ${LIBDRM_LIBRARIES} ${PYTHON_LIBRARIES})
20 add_custom_target(pyextras SOURCES test.py functest.py)
22 add_test(NAME pytest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/functest.py")
23 set_property(TEST pytest PROPERTY
24         ENVIRONMENT "PYTHONPATH=." "LD_LIBRARY_PATH=."
25 )