Initial version
[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 #include_directories(libkms)
12 #XXX
13 include_directories(../libkms++)
15 #set(CMAKE_SWIG_FLAGS "-I../../libkms")
17 set_source_files_properties(pykms.i PROPERTIES CPLUSPLUS ON)
18 swig_add_module(pykms python pykms.i)
19 swig_link_libraries(pykms kms++ ${LIBDRM_LIBRARIES} ${PYTHON_LIBRARIES})
21 add_custom_target(pyextras SOURCES test.py functest.py)
23 add_test(NAME pytest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/functest.py")
24 set_property(TEST pytest PROPERTY
25         ENVIRONMENT "PYTHONPATH=." "LD_LIBRARY_PATH=."
26 )