Fix building as Python module (manpage-generation)
authorCampbell Barton <ideasman42@gmail.com>
Mon, 8 Sep 2014 01:22:40 +0000 (11:22 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 8 Sep 2014 01:22:40 +0000 (11:22 +1000)
source/blender/python/mathutils/mathutils_Matrix.c
source/creator/CMakeLists.txt

index 675234fe3e41bc6aeed646abfba7132fbde96689..282f29b4934a64541a41a099aef7787c3332c9d2 100644 (file)
@@ -1560,10 +1560,10 @@ static PyObject *Matrix_adjugate(MatrixObject *self)
                adjoint_matrix_n(self->matrix, self->matrix, self->num_col);
        }
        else {
-                       PyErr_Format(PyExc_ValueError,
-                                    "Matrix adjugate(d): size (%d) unsupported",
-                                    (int)self->num_col);
-                       return NULL;
+               PyErr_Format(PyExc_ValueError,
+                            "Matrix adjugate(d): size (%d) unsupported",
+                            (int)self->num_col);
+               return NULL;
        }
 
 
index b32aa464d670c270f99f5214329013189c1811d8..6ed87f6596cf59ed9fe37865609cb334fe09d4f2 100644 (file)
@@ -391,18 +391,25 @@ endif()
 
 if(UNIX AND NOT APPLE)
 
-       install(
-               CODE
-               "
-               execute_process(COMMAND
-                               ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py
-                               ${TARGETDIR}/blender
-                               ${TARGETDIR}/blender.1)
-               "
-       )
+       if(NOT WITH_PYTHON_MODULE)
+               install(
+                       CODE
+                       "
+                       execute_process(COMMAND
+                                                       ${CMAKE_SOURCE_DIR}/doc/manpage/blender.1.py
+                                                       ${TARGETDIR}/blender
+                                                       ${TARGETDIR}/blender.1)
+                       "
+               )
+       endif()
 
        # there are a few differences between portable and system install
        if(WITH_INSTALL_PORTABLE)
+               install(
+                       FILES ${TARGETDIR}/blender.1
+                       DESTINATION ${TARGETDIR}
+               )
+
                install(
                        FILES
                                ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
@@ -434,6 +441,11 @@ if(UNIX AND NOT APPLE)
                                PROGRAMS ${TARGETDIR}/blender
                                DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
                        )
+                       # manpage only with 'blender' binary
+                       install(
+                               FILES ${TARGETDIR}/blender.1
+                               DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
+                       )
                endif()
 
 
@@ -468,10 +480,6 @@ if(UNIX AND NOT APPLE)
                        PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
                        DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
                )
-               install(
-                       FILES ${TARGETDIR}/blender.1
-                       DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
-               )
                install(
                        FILES ${BLENDER_TEXT_FILES}
                        DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender