- cmake use execute_process, exec_program is deprecated.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 Jan 2011 08:43:29 +0000 (08:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 Jan 2011 08:43:29 +0000 (08:43 +0000)
- game engine builds without python again.

CMakeLists.txt
source/gameengine/Ketsji/KX_IpoActuator.h

index d3095347ab459a9e3f0cc8ce078ba89bd95d7dd0..772bca71fb5558bbb58d7a276d77d6d9283b0d68 100644 (file)
@@ -885,18 +885,18 @@ endif()
 if(WITH_BUILDINFO)
        # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
        if(UNIX)
-               EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE)
-               EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME)  
-               EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN)
+               execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
+               execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)  
+               execute_process(COMMAND svnversion ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_REV RESULT_VARIABLE BUILD_REV_RETURN OUTPUT_STRIP_TRAILING_WHITESPACE)
                if(BUILD_REV_RETURN)
                        set(BUILD_REV "unknown")
                endif()
        endif()
        
        if(WIN32)
-               EXEC_PROGRAM("cmd /c date /t" OUTPUT_VARIABLE BUILD_DATE)
-               EXEC_PROGRAM("cmd /c time /t" OUTPUT_VARIABLE BUILD_TIME)  
-               EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV RETURN_VALUE BUILD_REV_RETURN)
+               execute_process(COMMAND cmd /c date /t OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
+               execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)  
+               execute_process(COMMAND svnversion ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_REV RESULT_VARIABLE BUILD_REV_RETURN OUTPUT_STRIP_TRAILING_WHITESPACE)
                if(BUILD_REV_RETURN)
                        set(BUILD_REV "unknown")
                endif()
index dc3ff5543f91dcfde67fab656a8fd7de3a01fd38..61e7f0451d14889af2343729472c6aaaa1d2d1a9 100644 (file)
@@ -103,11 +103,12 @@ public:
                KX_ACT_IPO_MAX
        };
 
+#ifdef WITH_PYTHON
        static PyObject*        pyattr_get_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
        static int                      pyattr_set_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
        static PyObject*        pyattr_get_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
        static int                      pyattr_set_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
-
+#endif
        static const char *S_KX_ACT_IPO_PLAY_STRING;
        static const char *S_KX_ACT_IPO_PINGPONG_STRING;
        static const char *S_KX_ACT_IPO_FLIPPER_STRING;