Text archives Help
- From: abe@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1167 - trunk/SwigInterface
- Date: Fri, 11 Aug 2006 21:30:45 -0600 (MDT)
Author: abe
Date: Fri Aug 11 21:30:44 2006
New Revision: 1167
Modified:
trunk/SwigInterface/CMakeLists.txt
Log:
Forgot to commit this file too, and then accidentally deleted it on my other
workstation.
M CMakeLists.txt
Modified: trunk/SwigInterface/CMakeLists.txt
==============================================================================
--- trunk/SwigInterface/CMakeLists.txt (original)
+++ trunk/SwigInterface/CMakeLists.txt Fri Aug 11 21:30:44 2006
@@ -1,9 +1,24 @@
-INCLUDE(${SWIG_USE_FILE})
+# Since SWIG support wasn't added to CMake until version 2.0, only do
+# the check if we have a new enough version.
+SET(BUILD_SWIG_INTERFACE 0 CACHE BOOL "Check for swig/python")
+IF(BUILD_SWIG_INTERFACE)
+IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
+ # This will dump all the interface files in the library path. Note
+ # that this needs to be set before you try to find swig.
+ SET(CMAKE_SWIG_OUTDIR ${LIBRARY_OUTPUT_PATH})
+ # Only process the swig directory if we have swig stuff
+ FIND_PACKAGE(SWIG)
+ IF (SWIG_FOUND)
+
+
+###############################################################################
FIND_PACKAGE(PythonLibs)
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
+INCLUDE(${SWIG_USE_FILE})
+
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
SET_SOURCE_FILES_PROPERTIES(example.i PROPERTIES CPLUSPLUS ON)
@@ -79,6 +94,9 @@
PYTHON_POST_BUILD_COPY(wxManta.py)
PYTHON_POST_BUILD_COPY(runmanta.py)
PYTHON_POST_BUILD_COPY(runwxmanta.py)
+###############################################################################
-
+ENDIF (SWIG_FOUND)
+ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
+ENDIF(BUILD_SWIG_INTERFACE)
- [MANTA] r1167 - trunk/SwigInterface, abe, 08/11/2006
Archive powered by MHonArc 2.6.16.