I don't get kig python scripting support with a cmake build of tdeedu.
kig builds and runs, but there's no 'Python Script' icon and Objects|Other just shows Locus, Text Label, and Measure Transport.
The autotools build shows the icon with an additional Objects|Other menu item 'Python Script' - and it works.
For the autotools build, there is a test in configure for libboost_python and it is included as a dependency for scripting and libkigpart, and there's this possible warning indicating that libboost_python is required:
WARNING: Kig needs the Python and Boost.Python libraries and their headers
installed for its Python scripting support. One of both was not
found, or the versions were incompatible, and Python scripting will be disabled.
There's no libboost_python dependency in libkigpart for the cmake build.
I don't get kig python scripting support with a cmake build of tdeedu.
kig builds and runs, but there's no 'Python Script' icon and Objects|Other just shows Locus, Text Label, and Measure Transport.
The autotools build shows the icon with an additional Objects|Other menu item 'Python Script' - and it works.
For the autotools build, there is a test in configure for libboost_python and it is included as a dependency for scripting and libkigpart, and there's this possible warning indicating that libboost_python is required:
WARNING: Kig needs the Python and Boost.Python libraries and their headers \
installed for its Python scripting support. One of both was not \
found, or the versions were incompatible, and Python scripting will be disabled.
There's no libboost_python dependency in libkigpart for the cmake build.
and kig python scripting now works from a cmake build.
In kig/CMakeLists.txt, scripting is not an option as it is in the autotools build, and KIG_ENABLE_PYTHON_SCRIPTING needs to be set.
These are the files where it appears:
> kig/configure.in.in: AC_DEFINE( KIG_ENABLE_PYTHON_SCRIPTING, 1, [Defined if Kig Python scripting is enabled] )
kig/misc/builtin_stuff.cc:#ifdef KIG_ENABLE_PYTHON_SCRIPTING
kig/misc/guiaction.cc:#ifdef KIG_ENABLE_PYTHON_SCRIPTING
kig/misc/guiaction.h:#ifdef KIG_ENABLE_PYTHON_SCRIPTING
kig/modes/popup.cc:#ifdef KIG_ENABLE_PYTHON_SCRIPTING
kig/objects/object_type_factory.cc:#ifdef KIG_ENABLE_PYTHON_SCRIPTING
I added `add_definitions( -DKIG_ENABLE_PYTHON_SCRIPTING )`
to kig/{misc,modes,objects}/CMakeLists.txt
```diff
--- kig/misc/CMakeLists.txt
+++ kig/misc/CMakeLists.txt
@@ -15,0 +16 @@
+add_definitions( -DKIG_ENABLE_PYTHON_SCRIPTING )
--- kig/modes/CMakeLists.txt
+++ kig/modes/CMakeLists.txt
@@ -15,0 +16 @@
+add_definitions( -DKIG_ENABLE_PYTHON_SCRIPTING )
--- kig/objects/CMakeLists.txt
+++ kig/objects/CMakeLists.txt
@@ -15,0 +16 @@
+add_definitions( -DKIG_ENABLE_PYTHON_SCRIPTING )
```
**Also** had to get libboost_python into the build ..
```diff
--- kig/scripting/CMakeLists.txt
+++ kig/scripting/CMakeLists.txt
@@ -32 +32 @@
- ${Boost_LIBRARIES}
+ boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
```
and libtdetexteditor ..
```diff
--- kig/CMakeLists.txt
+++ kig/CMakeLists.txt
@@ -41,0 +42 @@
+ tdetexteditor-shared
```
and kig python scripting now works from a cmake build.
I don't get kig python scripting support with a cmake build of tdeedu.
kig builds and runs, but there's no 'Python Script' icon and Objects|Other just shows Locus, Text Label, and Measure Transport.
The autotools build shows the icon with an additional Objects|Other menu item 'Python Script' - and it works.
For the autotools build, there is a test in configure for libboost_python and it is included as a dependency for scripting and libkigpart, and there's this possible warning indicating that libboost_python is required:
WARNING: Kig needs the Python and Boost.Python libraries and their headers
installed for its Python scripting support. One of both was not
found, or the versions were incompatible, and Python scripting will be disabled.
There's no libboost_python dependency in libkigpart for the cmake build.
In kig/CMakeLists.txt, scripting is not an option as it is in the autotools build, and KIG_ENABLE_PYTHON_SCRIPTING needs to be set.
These are the files where it appears:
I added
add_definitions( -DKIG_ENABLE_PYTHON_SCRIPTING )
to kig/{misc,modes,objects}/CMakeLists.txt
Also had to get libboost_python into the build ..
and libtdetexteditor ..
and kig python scripting now works from a cmake build.
@Ray-V Would you mind sending PR with your changes? This will be easier for everyone here to test.
for tracking reference, PR #7 is addressing this.
Fixed by commits listed above.