KDL trunk r30427 looks for Python and SIP even if PYTHON_BINDINGS is off

During cmake an error message comes up about missing SIP on systems with out it, even though the python bindings have been turned off. Shouldn't KDL not look for python + SIP if the bindings are off? CMake output below. Demonstrated on Ubuntu Jaunty.
{{{
sroderick@nrc-serenitylx:~/nrc/build/orocos/kdl$ cmake -DOROCOS_TARGET=$OROCOS_TARGET -DCMAKE_INSTALL_PREFIX=$OROCOS_INSTALL_DIR -DOROCOS_INSTALL=$OROCOS_INSTALL_DIR -DENABLE_CORBA=ON -DCORBA_IMPLEMENTATION=OMNIORB -DOROCOS_PLUGIN=ON -DPYTHON_BINDINGS=OFF $OROCOS_SRC_DIR/kdl
Orocos KDL version (1.0.99)
Build type set to 'Release' by user.
-- -- Looking for Eigen2 - found
-- Detecting RTT
Searching RTT in /home/sroderick/nrc/install:
Found flavors: orocos-rtt-corba-gnulinux.pc;orocos-rtt-gnulinux.pc
-- Looking for orocos-rtt-corba-gnulinux >= 1.3.0 -- found
Detected CORBA build for gnulinux
-- Looking for orocos-rtt-corba-gnulinux -- found
Includes in: /home/sroderick/nrc/install/include/rtt/corba;/home/sroderick/nrc/install/include
Libraries in: /home/sroderick/nrc/install/lib
Libraries: orocos-rtt-corba-gnulinux;orocos-rtt-gnulinux
Defines: -DOROCOS_TARGET=gnulinux
-- Looking for orocos-rtt-gnulinux >= 1.3.0 -- found
Using: gnulinux . Set OROCOS_TARGET variable to another one to change the compile target.
-- Looking for orocos-rtt-gnulinux >= 1.0.0 -- found
Includes in: /home/sroderick/nrc/install/include
Libraries in: /home/sroderick/nrc/install/lib
Libraries: orocos-rtt-gnulinux
Defines: -DOROCOS_TARGET=gnulinux
CMAKE_CXX_FLAGS_RTT are : -O2 -DNDEBUG -DOROCOS_TARGET=gnulinux
-- Found PythonInterp: /usr/bin/python2.6
-- Found Python executable: /usr/bin/python2.6
-- Found Python version: 2.6.2
-- Found Python library: /usr/lib/libpython2.6.so
-- Python libraries found
Traceback (most recent call last):
File "/home/sroderick/nrc/src/orocos/kdl/config/FindSIP.py", line 8, in
import sipconfig
ImportError: No module named sipconfig
-- SIP not found!
-- Python bindings disabled due dependency problems!
-- CORBA enabled: OMNIORB
CORBA Support enabled.
HPPS: /home/sroderick/nrc/src/orocos/kdl/src/bindings/rtt/corba/CorbaKDLConversion.hpp;/home/sroderick/nrc/src/orocos/kdl/src/bindings/rtt/corba/corbatoolkit.hpp;/home/sroderick/nrc/build/orocos/kdl/src/bindings/rtt/corba/KDLTypesC.h
Disabling packaging for version 2.6
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sroderick/nrc/build/orocos/kdl
}}}

Ruben Smits's picture

KDL trunk r30427 looks for Python and SIP even if PYTHON_BINDING

On Thu, Aug 13, 2009 at 11:25 PM, kiwi [dot] net [..] ...<kiwi [dot] net [..] ...> wrote:
> During cmake an error message comes up about missing SIP on systems with out it, even though the python bindings have been turned off. Shouldn't KDL >not look for python + SIP if the bindings are off? CMake output below. Demonstrated on Ubuntu Jaunty.

It should be fixed now:

svn ci -m"Fix bug: KDL trunk r30427 looks for Python and SIP even if
PYTHON_BINDINGS is off"
Sending CMakeLists.txt
Sending src/bindings/python/CMakeLists.txt
Transmitting file data ..
Committed revision 30428.

Did you give the new cmake logic for the python bindings already a try
on a OSX system? I'm just curious if it still works on those systems.

Ruben

> {{{
> sroderick@nrc-serenitylx:~/nrc/build/orocos/kdl$ cmake -DOROCOS_TARGET=$OROCOS_TARGET  -DCMAKE_INSTALL_PREFIX=$OROCOS_INSTALL_DIR   -DOROCOS_INSTALL=$OROCOS_INSTALL_DIR   -DENABLE_CORBA=ON -DCORBA_IMPLEMENTATION=OMNIORB   -DOROCOS_PLUGIN=ON -DPYTHON_BINDINGS=OFF         $OROCOS_SRC_DIR/kdl
> Orocos KDL version  (1.0.99)
> Build type set to 'Release' by user.
> -- -- Looking for Eigen2 - found
> -- Detecting RTT
> Searching RTT in /home/sroderick/nrc/install:
> Found flavors: orocos-rtt-corba-gnulinux.pc;orocos-rtt-gnulinux.pc
> -- Looking for orocos-rtt-corba-gnulinux >= 1.3.0 -- found
> Detected CORBA build for gnulinux
> -- Looking for orocos-rtt-corba-gnulinux -- found
>   Includes in: /home/sroderick/nrc/install/include/rtt/corba;/home/sroderick/nrc/install/include
>   Libraries in: /home/sroderick/nrc/install/lib
>   Libraries: orocos-rtt-corba-gnulinux;orocos-rtt-gnulinux
>   Defines:  -DOROCOS_TARGET=gnulinux
> -- Looking for orocos-rtt-gnulinux >= 1.3.0 -- found
>  Using: gnulinux . Set OROCOS_TARGET variable to another one to change the compile target.
> -- Looking for orocos-rtt-gnulinux >= 1.0.0 -- found
>   Includes in: /home/sroderick/nrc/install/include
>   Libraries in: /home/sroderick/nrc/install/lib
>   Libraries: orocos-rtt-gnulinux
>   Defines:  -DOROCOS_TARGET=gnulinux
> CMAKE_CXX_FLAGS_RTT are : -O2 -DNDEBUG  -DOROCOS_TARGET=gnulinux
> -- Found PythonInterp: /usr/bin/python2.6
> -- Found Python executable: /usr/bin/python2.6
> -- Found Python version: 2.6.2
> -- Found Python library: /usr/lib/libpython2.6.so
> -- Python libraries found
> Traceback (most recent call last):
>  File "/home/sroderick/nrc/src/orocos/kdl/config/FindSIP.py", line 8, in <module>
>    import sipconfig
> ImportError: No module named sipconfig
> -- SIP not found!
> -- Python bindings disabled due dependency problems!
> -- CORBA enabled: OMNIORB
> CORBA Support enabled.
> HPPS: /home/sroderick/nrc/src/orocos/kdl/src/bindings/rtt/corba/CorbaKDLConversion.hpp;/home/sroderick/nrc/src/orocos/kdl/src/bindings/rtt/corba/corbatoolkit.hpp;/home/sroderick/nrc/build/orocos/kdl/src/bindings/rtt/corba/KDLTypesC.h
> Disabling packaging for version 2.6
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/sroderick/nrc/build/orocos/kdl
> }}}
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>

PatchIndex:

Patch
{{{
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 30427)
+++ CMakeLists.txt (working copy)
@@ -67,7 +67,9 @@

OPTION( PYTHON_BINDINGS "Build python-bindings?" OFF)

-INCLUDE (${PROJ_SOURCE_DIR}/config/FindSIPandPython.cmake)
+IF (PYTHON_BINDINGS)
+ INCLUDE (${PROJ_SOURCE_DIR}/config/FindSIPandPython.cmake)
+ENDIF (PYTHON_BINDINGS)
INCLUDE (${PROJ_SOURCE_DIR}/config/FindCorbaDeps.cmake)

OPTION(ENABLE_TESTS OFF "Enable building of tests")
}}}

PatchIndex:

Patch
{{{
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 30427)
+++ CMakeLists.txt (working copy)
@@ -67,7 +67,9 @@

OPTION( PYTHON_BINDINGS "Build python-bindings?" OFF)

-INCLUDE (${PROJ_SOURCE_DIR}/config/FindSIPandPython.cmake)
+IF (PYTHON_BINDINGS)
+ INCLUDE (${PROJ_SOURCE_DIR}/config/FindSIPandPython.cmake)
+ENDIF (PYTHON_BINDINGS)
INCLUDE (${PROJ_SOURCE_DIR}/config/FindCorbaDeps.cmake)

OPTION(ENABLE_TESTS OFF "Enable building of tests")
}}}

KDL trunk r30427 looks for Python and SIP even if PYTHON_BINDING

During cmake an error message comes up about missing SIP on systems with out it, even though the python bindings have been turned off. Shouldn't KDL not look for python + SIP if the bindings are off? CMake output below. Demonstrated on Ubuntu Jaunty.
{{{
sroderick@nrc-serenitylx:~/nrc/build/orocos/kdl$ cmake -DOROCOS_TARGET=$OROCOS_TARGET -DCMAKE_INSTALL_PREFIX=$OROCOS_INSTALL_DIR -DOROCOS_INSTALL=$OROCOS_INSTALL_DIR -DENABLE_CORBA=ON -DCORBA_IMPLEMENTATION=OMNIORB -DOROCOS_PLUGIN=ON -DPYTHON_BINDINGS=OFF $OROCOS_SRC_DIR/kdl
Orocos KDL version (1.0.99)
Build type set to 'Release' by user.
-- -- Looking for Eigen2 - found
-- Detecting RTT
Searching RTT in /home/sroderick/nrc/install:
Found flavors: orocos-rtt-corba-gnulinux.pc;orocos-rtt-gnulinux.pc
-- Looking for orocos-rtt-corba-gnulinux >= 1.3.0 -- found
Detected CORBA build for gnulinux
-- Looking for orocos-rtt-corba-gnulinux -- found
Includes in: /home/sroderick/nrc/install/include/rtt/corba;/home/sroderick/nrc/install/include
Libraries in: /home/sroderick/nrc/install/lib
Libraries: orocos-rtt-corba-gnulinux;orocos-rtt-gnulinux
Defines: -DOROCOS_TARGET=gnulinux
-- Looking for orocos-rtt-gnulinux >= 1.3.0 -- found
Using: gnulinux . Set OROCOS_TARGET variable to another one to change the compile target.
-- Looking for orocos-rtt-gnulinux >= 1.0.0 -- found
Includes in: /home/sroderick/nrc/install/include
Libraries in: /home/sroderick/nrc/install/lib
Libraries: orocos-rtt-gnulinux
Defines: -DOROCOS_TARGET=gnulinux
CMAKE_CXX_FLAGS_RTT are : -O2 -DNDEBUG -DOROCOS_TARGET=gnulinux
-- Found PythonInterp: /usr/bin/python2.6
-- Found Python executable: /usr/bin/python2.6
-- Found Python version: 2.6.2
-- Found Python library: /usr/lib/libpython2.6.so
-- Python libraries found
Traceback (most recent call last):
File "/home/sroderick/nrc/src/orocos/kdl/config/FindSIP.py", line 8, in <module>
import sipconfig
ImportError: No module named sipconfig
-- SIP not found!
-- Python bindings disabled due dependency problems!
-- CORBA enabled: OMNIORB
CORBA Support enabled.
HPPS: /home/sroderick/nrc/src/orocos/kdl/src/bindings/rtt/corba/CorbaKDLConversion.hpp;/home/sroderick/nrc/src/orocos/kdl/src/bindings/rtt/corba/corbatoolkit.hpp;/home/sroderick/nrc/build/orocos/kdl/src/bindings/rtt/corba/KDLTypesC.h
Disabling packaging for version 2.6
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sroderick/nrc/build/orocos/kdl
}}}