mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-11-04 09:13:05 +00:00 
			
		
		
		
	Fix detection of python when using Macports
This commit is contained in:
		@@ -78,7 +78,14 @@ if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
 | 
				
			|||||||
        endif()
 | 
					        endif()
 | 
				
			||||||
    endif()
 | 
					    endif()
 | 
				
			||||||
else()
 | 
					else()
 | 
				
			||||||
 | 
					    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
				
			||||||
 | 
					        set(_previous ${CMAKE_FIND_FRAMEWORK})
 | 
				
			||||||
 | 
					        set(CMAKE_FIND_FRAMEWORK LAST)
 | 
				
			||||||
 | 
					    endif()
 | 
				
			||||||
    find_package(Python3 COMPONENTS Interpreter)
 | 
					    find_package(Python3 COMPONENTS Interpreter)
 | 
				
			||||||
 | 
					    if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
				
			||||||
 | 
					        set(CMAKE_FIND_FRAMEWORK ${_previous})
 | 
				
			||||||
 | 
					    endif()
 | 
				
			||||||
    if(Python3_FOUND)
 | 
					    if(Python3_FOUND)
 | 
				
			||||||
        set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
 | 
					        set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
 | 
				
			||||||
        set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
 | 
					        set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -74,7 +74,14 @@ else()
 | 
				
			|||||||
        message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
 | 
					        message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
 | 
				
			||||||
        find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
 | 
					        find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
 | 
				
			||||||
    else()
 | 
					    else()
 | 
				
			||||||
 | 
					        if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
				
			||||||
 | 
					            set(_previous ${CMAKE_FIND_FRAMEWORK})
 | 
				
			||||||
 | 
					            set(CMAKE_FIND_FRAMEWORK LAST)
 | 
				
			||||||
 | 
					        endif()
 | 
				
			||||||
        find_package(Python3 COMPONENTS Interpreter)
 | 
					        find_package(Python3 COMPONENTS Interpreter)
 | 
				
			||||||
 | 
					        if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 | 
				
			||||||
 | 
					            set(CMAKE_FIND_FRAMEWORK ${_previous})
 | 
				
			||||||
 | 
					        endif()
 | 
				
			||||||
        if(Python3_FOUND)
 | 
					        if(Python3_FOUND)
 | 
				
			||||||
            set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
 | 
					            set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
 | 
				
			||||||
            set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
 | 
					            set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user