[sword-svn] r3559 - in trunk: bindings/swig/python cmake

greg.hellings at crosswire.org greg.hellings at crosswire.org
Thu Jan 4 00:19:23 MST 2018


Author: greg.hellings
Date: 2018-01-04 00:19:22 -0700 (Thu, 04 Jan 2018)
New Revision: 3559

Modified:
   trunk/bindings/swig/python/CMakeLists.txt
   trunk/cmake/options.cmake
Log:
Update Python install options

Updates defaults for Python install paths when not
installed to the default system location


Modified: trunk/bindings/swig/python/CMakeLists.txt
===================================================================
--- trunk/bindings/swig/python/CMakeLists.txt	2018-01-04 05:39:39 UTC (rev 3558)
+++ trunk/bindings/swig/python/CMakeLists.txt	2018-01-04 07:19:22 UTC (rev 3559)
@@ -44,11 +44,9 @@
 	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
 
 # Allow user installation to custom directory
-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}")
-ENDIF(SWORD_PYTHON_INSTALL_DIR)
+IF(NOT SWORD_PYTHON_INSTALL_DIR STREQUAL "")
+	SET(SETUP_ARGS "\"--prefix=${SWORD_PYTHON_INSTALL_DIR}\"")
+ENDIF(NOT SWORD_PYTHON_INSTALL_DIR STREQUAL "")
 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/install.cmake.in"
 	       "${CMAKE_CURRENT_BINARY_DIR}/install.cmake")
 

Modified: trunk/cmake/options.cmake
===================================================================
--- trunk/cmake/options.cmake	2018-01-04 05:39:39 UTC (rev 3558)
+++ trunk/cmake/options.cmake	2018-01-04 07:19:22 UTC (rev 3559)
@@ -22,9 +22,6 @@
     endif()
 endmacro(_SET_FANCY)
 
-# A list of the options that the library supports
-SET(SWORD_PYTHON_INSTALL_DIR "" CACHE STRING "Directory where the Python bindings will be installed. Defaults to default Python path.")
-
 # Installation options
 IF(APPLE)
 	SET(SWORD_INSTALL_DIR "/opt/local")
@@ -34,6 +31,7 @@
 	SET(SWORD_INSTALL_DIR "/usr/local")
 ENDIF(APPLE)
 
+# A list of the options that the library supports
 _SET_FANCY(CMAKE_INSTALL_PREFIX "${SWORD_INSTALL_DIR}" "Directory into which to install architecture-dependent files. Defaults to ${SWORD_INSTALL_DIR}.")
 
 _SET_FANCY(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" "Object code library install directory. Defaults to ${SWORD_INSTALL_DIR}/lib")
@@ -46,6 +44,8 @@
 
 _SET_FANCY(SHARE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/share" "Directory to install global data files. Defaults to ${SWORD_INSTALL_DIR}/share.")
 
+_SET_FANCY(SWORD_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE STRING "Directory where the Python bindings will be installed. Defaults to default Python path.")
+
 # Post-processing of variables
 MACRO(PROCESS_VERSION LEVEL VALUE)
     SET(SWORD_VERSION_${LEVEL} ${VALUE})




More information about the sword-cvs mailing list