[sword-devel] cmake python bindings

Ben cricketc at gmail.com
Thu Jan 8 19:47:38 MST 2015


Today I've been updating to the latest Sword 1.7 (from the 1-7-x
branch). I ran into an issue with the python module not getting
installed - here's the cmake command:
cmake -DLIBSWORD_LIBRARY_TYPE="Shared"
-DLIB_INSTALL_DIR=/usr/local/lib64 -DSWORD_BUILD_TESTS=Yes
-DSWORD_BINDINGS=Python -DSWORD_BUILD_EXAMPLES=Yes
<source dir>

With the following diff, it works fine:
$ svn diff
Index: bindings/swig/python/CMakeLists.txt
===================================================================
--- bindings/swig/python/CMakeLists.txt (revision 3319)
+++ bindings/swig/python/CMakeLists.txt (working copy)
@@ -47,7 +47,7 @@
 IF(SWORD_PYTHON_INSTALL_DIR)
     SET(SETUP_ARGS "--home=${SWORD_PYTHON_INSTALL_DIR} --root \$ENV{DESTDIR}")
 ELSE(SWORD_PYTHON_INSTALL_DIR)
-    SET(SETUP_ARGS "--root \$ENV{DESTDIR}")
+    SET(SETUP_ARGS "--prefix=${CMAKE_INSTALL_PREFIX}")
 ENDIF(SWORD_PYTHON_INSTALL_DIR)
 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/install.cmake.in"
               "${CMAKE_CURRENT_BINARY_DIR}/install.cmake")

There seems to be a problem because I'm not using $DESTDIR. Maybe 
there should be a test for whether DESTDIR is set, before using it 
with the --root option?

-Ben

PS. Thanks for maintaining the bug fixes in the 1.7 branch.




More information about the sword-devel mailing list