Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1879 - in trunk: CMake SwigInterface


Chronological Thread 
  • From: abe@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1879 - in trunk: CMake SwigInterface
  • Date: Tue, 27 Nov 2007 12:30:54 -0700 (MST)

Author: abe
Date: Tue Nov 27 12:30:53 2007
New Revision: 1879

Modified:
   trunk/CMake/Macros.cmake
   trunk/SwigInterface/CMakeLists.txt
Log:

Removed the post build step of copying python scripts into
build/lib. These scripts are not altered by the build and there is a
growing number of them (for camera paths etc.), so it makes sense to
leave them in the source tree. Ideally if we decided to provide the
option to "make install" manta rather than running it out of the build
tree, these scripts would be copied to something like <install
prefix>/share/Manta/python.

Updated the bin/pythonpath.csh script to include both build/lib (the
location of the swig'ed libraries) and SwigInterface/ (the location of
the unchanged scripts).

To use the python interface, issue:

source bin/pythonpath.csh
python <Manta Source Path>/SwigInterface/runwxmanta.py

I'll update the wiki and the Manta-project next.

M    CMake/Macros.cmake
M    SwigInterface/CMakeLists.txt


Modified: trunk/CMake/Macros.cmake
==============================================================================
--- trunk/CMake/Macros.cmake    (original)
+++ trunk/CMake/Macros.cmake    Tue Nov 27 12:30:53 2007
@@ -76,28 +76,6 @@
   ENDIF(${VARIABLE})
 ENDMACRO(SUBDIRS_IF)
 
-
-MACRO(PYTHON_POST_BUILD_COPY PY_FILE)
-   # Copy the python object to the lib directory.
-   ADD_CUSTOM_COMMAND(
-      POST_BUILD
-      OUTPUT       ${PROJECT_BINARY_DIR}/lib/${PY_FILE}
-      # DEPENDS must match the source file that will change.
-      DEPENDS      ${CMAKE_CURRENT_SOURCE_DIR}/${PY_FILE}
-      COMMAND      ${CMAKE_COMMAND}
-      ARGS -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PY_FILE}
-                   ${PROJECT_BINARY_DIR}/lib/${PY_FILE}
-      COMMENT "Copying ${PY_FILE} to ${PROJECT_BINARY_DIR}/lib/${PY_FILE}"
-      )  
-
-   ADD_CUSTOM_TARGET(
-      copy_${PY_FILE}
-      ALL
-      # DEPENDS Must match custom command OUTPUT.
-      DEPENDS ${PROJECT_BINARY_DIR}/lib/${PY_FILE} 
-      )
-ENDMACRO(PYTHON_POST_BUILD_COPY PY_FILE)
-
 SET(MANTA_THREE_PART_VERSION_REGEX "[0-9]+\\.[0-9]+\\.[0-9]+")
 
 # Computes the realtionship between two version strings.  A version

Modified: trunk/SwigInterface/CMakeLists.txt
==============================================================================
--- trunk/SwigInterface/CMakeLists.txt  (original)
+++ trunk/SwigInterface/CMakeLists.txt  Tue Nov 27 12:30:53 2007
@@ -108,10 +108,6 @@
     )
 ENDIF (APPLE_LEOPARD_LD)
 
-
-# X11 Interface.
-PYTHON_POST_BUILD_COPY(runmanta.py)
-
 ############################################################
 # wxManta Swig/Python
 
@@ -119,10 +115,6 @@
 # SET_SOURCE_FILES_PROPERTIES(wxManta_helper.i PROPERTIES SWIG_FLAGS 
"-Wall;-DSCI_NOPERSISTENT")
 # SWIG_ADD_MODULE(wxmanta_helper python wxManta_helper.i wxManta.cc 
wxManta.h)
 
-PYTHON_POST_BUILD_COPY(wxManta.py)
-PYTHON_POST_BUILD_COPY(runwxmanta.py)
-PYTHON_POST_BUILD_COPY(FloatSpin.py)
-
 ############################################################
 # Python callback code
 SET_SOURCE_FILES_PROPERTIES(pycallback.i PROPERTIES CPLUSPLUS ON)
@@ -132,9 +124,9 @@
 
 # Output a helper script for setting up path variables.
 FILE(WRITE ${CMAKE_BINARY_DIR}/bin/pythonpath.csh 
-  "setenv PYTHONPATH ${CMAKE_BINARY_DIR}/lib\n\n")
+  "setenv PYTHONPATH 
${CMAKE_SOURCE_DIR}/SwigInterface:${CMAKE_BINARY_DIR}/lib\n\n")
 FILE(WRITE ${CMAKE_BINARY_DIR}/bin/pythonpath.sh 
-  "export PYTHONPATH=${CMAKE_BINARY_DIR}/lib\n\n")
+  "export 
PYTHONPATH=${CMAKE_SOURCE_DIR}/SwigInterface:${CMAKE_BINARY_DIR}/lib\n\n")
 
 
###############################################################################
 ENDIF (SWIG_FOUND)




  • [Manta] r1879 - in trunk: CMake SwigInterface, abe, 11/27/2007

Archive powered by MHonArc 2.6.16.

Top of page