Salome HOME
Added an example of LIBXML2 processing module with "Plugin" XML files.
authorunknown <sbh@zetex.nnov.opencascade.com>
Mon, 17 Mar 2014 06:05:35 +0000 (10:05 +0400)
committerunknown <sbh@zetex.nnov.opencascade.com>
Mon, 17 Mar 2014 06:05:35 +0000 (10:05 +0400)
CMakeCommon/XMLProcessing.cmake [new file with mode: 0644]
env.bat
src/Config/plugin-PartSet.xml [new file with mode: 0644]
src/Config/plugins.xml [new file with mode: 0644]

diff --git a/CMakeCommon/XMLProcessing.cmake b/CMakeCommon/XMLProcessing.cmake
new file mode 100644 (file)
index 0000000..1143711
--- /dev/null
@@ -0,0 +1,13 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
+
+FILE(TO_CMAKE_PATH $ENV{LIBXML2_INCLUDE_DIR} LIBXML2_INCLUDE_DIR)
+FIND_PACKAGE(LibXml2 REQUIRED)
+if(LIBXML2_FOUND)
+    message(STATUS "Found libxml2 ver. " ${LIBXML2_VERSION_STRING})
+    message(STATUS "LIBXML2_LIBRARIES " ${LIBXML2_LIBRARIES})
+    message(STATUS "LIBXML2_INCLUDE_DIR " ${LIBXML2_INCLUDE_DIR})
+endif(LIBXML2_FOUND)
+
+INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
+ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
diff --git a/env.bat b/env.bat
index 60321e5e98b75011f37d1e51314d2af5698b4ebe..55814d96ef7e33ddf0dd98bc287236b0d0484f42 100644 (file)
--- a/env.bat
+++ b/env.bat
@@ -101,7 +101,11 @@ if "%QTDIR%" == "" (
 
 @REM -------------------------
 @REM LIBXML2
-@SET PATH=%PDIR%\libxml2-2.9.0\lib;%PATH%
+@SET LIBXML2_DIR=%PDIR%\libxml2-2.9.0
+@SET LIBXML2_INCLUDE_DIR=%LIBXML2_DIR%\include\libxml2
+@SET LIBXML2_LIB_DIR=%LIBXML2_DIR%\lib
+@SET LIBXML2_BIN_DIR=%LIBXML2_DIR%\bin
+@SET PATH=LIBXML2_BIN_DIR;LIBXML2_LIB_DIR;%PATH%
 @REM -------------------------
 
 @REM -------------------------
diff --git a/src/Config/plugin-PartSet.xml b/src/Config/plugin-PartSet.xml
new file mode 100644 (file)
index 0000000..feca64b
--- /dev/null
@@ -0,0 +1,16 @@
+<plugin name="PartSet">
+  <workbench>
+    <group name="Part">
+      <feature id="new_part" text="Part" tooltip="Creates a new part" icon=":pictures/part_ico.png">
+        <label text="No feature..."/>
+      </feature>
+      <feature id="duplicate" text="Duplicate" tooltip="Duplicate selected object" icon=":icons/duplicate.png"/>
+      <feature id="remove" text="Remove"  tooltip="Remove selected object" icon=":icons/remove.png"/>
+    </group>
+    <group name="Construction">
+      <feature id="new_point" text="Point" tooltip="Create a new point" icon=":icons/point.png"/>
+      <feature id="new_axis" text="Axis" tooltip="Create a new axis" icon=":icons/axis.png" keysequence=""/>
+      <feature id="new_plane" text="Plane" tooltip="Create a new plane" icon=":icons/plane.png" keysequence=""/>
+    </group>
+  </workbench>  
+</plugin>
\ No newline at end of file
diff --git a/src/Config/plugins.xml b/src/Config/plugins.xml
new file mode 100644 (file)
index 0000000..2931524
--- /dev/null
@@ -0,0 +1,3 @@
+<plugins>
+  <plugin library="PartSetPlugin" configuration="plugin-PartSet.xml"/>
+</plugins>
\ No newline at end of file