all repos — mgba @ c471d03c7dfcd5048599aa5ab37b1e6e9fefae4b

mGBA Game Boy Advance Emulator

Python: Play nice with venvs
Vicki Pfau vi@endrift.com
Sat, 06 Jul 2019 16:10:20 -0700
commit

c471d03c7dfcd5048599aa5ab37b1e6e9fefae4b

parent

5018364c0140a0eb8ae8d3368651edd66784a4d9

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/platform/python/CMakeLists.txtsrc/platform/python/CMakeLists.txt

@@ -1,5 +1,8 @@

-find_package(PythonLibs ${USE_PYTHON_VERSION}) +if(DEFINED ENV{VIRTUAL_ENV}) + find_program(PYTHON_EXECUTABLE NAMES python PATHS "$ENV{VIRTUAL_ENV}/bin") +endif() find_package(PythonInterp ${USE_PYTHON_VERSION}) +find_package(PythonLibs ${USE_PYTHON_VERSION}) list(APPEND DEPENDENCY_LIB ${PYTHON_LIBRARIES}) include_directories(AFTER ${PYTHON_INCLUDE_DIRS})