From 99c165c078222c789d5fc90a79c756c8fffdafea Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Wed, 3 Feb 2016 16:48:45 +0100 Subject: Add python wrap for pcilib --- xml/test2/camera.xml | 6 ++++++ xml/test2/names.xml | 16 ++++++++++++++++ xml/test2/props.xml | 4 ++++ xml/test2/reg2.py | 0 xml/test2/units.xml | 35 +++++++++++++++++++++++++++++++++++ xml/test2/views.xml | 6 ++++++ 6 files changed, 67 insertions(+) create mode 100644 xml/test2/camera.xml create mode 100644 xml/test2/names.xml create mode 100644 xml/test2/props.xml create mode 100644 xml/test2/reg2.py create mode 100644 xml/test2/units.xml create mode 100644 xml/test2/views.xml (limited to 'xml') diff --git a/xml/test2/camera.xml b/xml/test2/camera.xml new file mode 100644 index 0000000..4b31209 --- /dev/null +++ b/xml/test2/camera.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/xml/test2/names.xml b/xml/test2/names.xml new file mode 100644 index 0000000..f6ddbcc --- /dev/null +++ b/xml/test2/names.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/xml/test2/props.xml b/xml/test2/props.xml new file mode 100644 index 0000000..f7a1329 --- /dev/null +++ b/xml/test2/props.xml @@ -0,0 +1,4 @@ + + + + diff --git a/xml/test2/reg2.py b/xml/test2/reg2.py new file mode 100644 index 0000000..e69de29 diff --git a/xml/test2/units.xml b/xml/test2/units.xml new file mode 100644 index 0000000..74ab9f7 --- /dev/null +++ b/xml/test2/units.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/test2/views.xml b/xml/test2/views.xml new file mode 100644 index 0000000..c40cd0f --- /dev/null +++ b/xml/test2/views.xml @@ -0,0 +1,6 @@ + + + + + + -- cgit v1.2.3 From 5349163e93a107fdfea2ad58760f6149a8d749b0 Mon Sep 17 00:00:00 2001 From: Vasilii Chernov Date: Fri, 5 Feb 2016 12:33:48 +0100 Subject: Add support for python script properties. Correct pcilib python wrapping. Update examples. Update cmakelists for work in shadow build mode. --- xml/CMakeLists.txt | 27 +++++++++++++++++++++++++++ xml/model.xsd | 1 + xml/references.xsd | 1 + xml/test2/camera.xml | 6 ------ xml/test2/names.xml | 16 ---------------- xml/test2/props.xml | 4 ---- xml/test2/reg2.py | 0 xml/test2/units.xml | 35 ----------------------------------- xml/test2/views.xml | 6 ------ xml/test_pywrap/camera.xml | 6 ++++++ xml/test_pywrap/names.xml | 16 ++++++++++++++++ xml/test_pywrap/props.xml | 14 ++++++++++++++ xml/test_pywrap/test_prop2.py | 7 +++++++ xml/test_pywrap/test_prop3.py | 4 ++++ xml/test_pywrap/units.xml | 35 +++++++++++++++++++++++++++++++++++ xml/test_pywrap/views.xml | 6 ++++++ xml/types.xsd | 11 +++++++++++ 17 files changed, 128 insertions(+), 67 deletions(-) delete mode 100644 xml/test2/camera.xml delete mode 100644 xml/test2/names.xml delete mode 100644 xml/test2/props.xml delete mode 100644 xml/test2/reg2.py delete mode 100644 xml/test2/units.xml delete mode 100644 xml/test2/views.xml create mode 100644 xml/test_pywrap/camera.xml create mode 100644 xml/test_pywrap/names.xml create mode 100644 xml/test_pywrap/props.xml create mode 100644 xml/test_pywrap/test_prop2.py create mode 100644 xml/test_pywrap/test_prop3.py create mode 100644 xml/test_pywrap/units.xml create mode 100644 xml/test_pywrap/views.xml (limited to 'xml') diff --git a/xml/CMakeLists.txt b/xml/CMakeLists.txt index a7ac800..0b12d87 100644 --- a/xml/CMakeLists.txt +++ b/xml/CMakeLists.txt @@ -1,3 +1,30 @@ install(FILES model.xsd references.xsd types.xsd DESTINATION ${PCILIB_MODEL_DIR} ) + +# Copy files from source directory to destination directory, substituting any +# variables. Create destination directory if it does not exist. + +macro(configure_files srcDir destDir) + message(STATUS "Configuring directory ${destDir}") + make_directory(${destDir}) + + file(GLOB templateFiles RELATIVE ${srcDir} ${srcDir}/*) + foreach(templateFile ${templateFiles}) + set(srcTemplatePath ${srcDir}/${templateFile}) + if(NOT IS_DIRECTORY ${srcTemplatePath}) + message(STATUS "Configuring file ${templateFile}") + configure_file( + ${srcTemplatePath} + ${destDir}/${templateFile} + @ONLY) + endif(NOT IS_DIRECTORY ${srcTemplatePath}) + endforeach(templateFile) +endmacro(configure_files) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/model.xsd ${CMAKE_CURRENT_BINARY_DIR}/model.xsd) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/references.xsd ${CMAKE_CURRENT_BINARY_DIR}/references.xsd) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/types.xsd ${CMAKE_CURRENT_BINARY_DIR}/types.xsd) + +configure_files(${CMAKE_CURRENT_SOURCE_DIR}/test ${CMAKE_CURRENT_BINARY_DIR}/test) +configure_files(${CMAKE_CURRENT_SOURCE_DIR}/test_pywrap ${CMAKE_CURRENT_BINARY_DIR}/test_pywrap) diff --git a/xml/model.xsd b/xml/model.xsd index 164e887..f6f5ea3 100644 --- a/xml/model.xsd +++ b/xml/model.xsd @@ -7,6 +7,7 @@ + diff --git a/xml/references.xsd b/xml/references.xsd index 4474141..523daa2 100644 --- a/xml/references.xsd +++ b/xml/references.xsd @@ -6,6 +6,7 @@ + diff --git a/xml/test2/camera.xml b/xml/test2/camera.xml deleted file mode 100644 index 4b31209..0000000 --- a/xml/test2/camera.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/xml/test2/names.xml b/xml/test2/names.xml deleted file mode 100644 index f6ddbcc..0000000 --- a/xml/test2/names.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/xml/test2/props.xml b/xml/test2/props.xml deleted file mode 100644 index f7a1329..0000000 --- a/xml/test2/props.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/xml/test2/reg2.py b/xml/test2/reg2.py deleted file mode 100644 index e69de29..0000000 diff --git a/xml/test2/units.xml b/xml/test2/units.xml deleted file mode 100644 index 74ab9f7..0000000 --- a/xml/test2/units.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xml/test2/views.xml b/xml/test2/views.xml deleted file mode 100644 index c40cd0f..0000000 --- a/xml/test2/views.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/xml/test_pywrap/camera.xml b/xml/test_pywrap/camera.xml new file mode 100644 index 0000000..4b31209 --- /dev/null +++ b/xml/test_pywrap/camera.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/xml/test_pywrap/names.xml b/xml/test_pywrap/names.xml new file mode 100644 index 0000000..f6ddbcc --- /dev/null +++ b/xml/test_pywrap/names.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/xml/test_pywrap/props.xml b/xml/test_pywrap/props.xml new file mode 100644 index 0000000..137ad04 --- /dev/null +++ b/xml/test_pywrap/props.xml @@ -0,0 +1,14 @@ + + + +