cmake function to install python package once make install is completed
							parent
							
								
									cb55d81fb5
								
							
						
					
					
						commit
						1725a577cf
					
				| 
						 | 
				
			
			@ -279,3 +279,10 @@ function(install_cython_files source_files dest_directory)
 | 
			
		|||
 | 
			
		||||
endfunction()
 | 
			
		||||
 | 
			
		||||
function(install_python_package install_path)
 | 
			
		||||
  set(package_path "${install_path}${GTSAM_BUILD_TAG}")
 | 
			
		||||
  # set cython directory permissions to user so we don't get permission denied
 | 
			
		||||
  install(CODE "execute_process(COMMAND sh \"-c\" \"chown -R $(logname):$(logname) ${package_path}\")")
 | 
			
		||||
  # go to cython directory and run setup.py
 | 
			
		||||
  install(CODE "execute_process(COMMAND sh \"-c\" \"cd ${package_path} && python setup.py install\")")
 | 
			
		||||
endfunction()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -45,4 +45,6 @@ if (GTSAM_INSTALL_CYTHON_TOOLBOX)
 | 
			
		|||
  install_cython_scripts("${PROJECT_SOURCE_DIR}/cython/gtsam" "${GTSAM_CYTHON_INSTALL_PATH}" "*.py")
 | 
			
		||||
  install_cython_scripts("${PROJECT_SOURCE_DIR}/cython/gtsam_unstable" "${GTSAM_CYTHON_INSTALL_PATH}" "*.py")
 | 
			
		||||
 | 
			
		||||
  install_python_package("${GTSAM_CYTHON_INSTALL_PATH}")
 | 
			
		||||
 | 
			
		||||
endif ()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue