Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
6697f80f
Commit
6697f80f
authored
Aug 08, 2016
by
Wenzel Jakob
Committed by
GitHub
Aug 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #325 from Hubble1942/fix-python-library-path-in-windows-venv
Fixed finding python libraries on windows in venv
parents
72270777
b81c500c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
tools/FindPythonLibsNew.cmake
+14
-0
No files found.
tools/FindPythonLibsNew.cmake
View file @
6697f80f
...
@@ -142,6 +142,20 @@ endif()
...
@@ -142,6 +142,20 @@ endif()
if
(
CMAKE_HOST_WIN32
)
if
(
CMAKE_HOST_WIN32
)
set
(
PYTHON_LIBRARY
set
(
PYTHON_LIBRARY
"
${
PYTHON_PREFIX
}
/libs/Python
${
PYTHON_LIBRARY_SUFFIX
}
.lib"
)
"
${
PYTHON_PREFIX
}
/libs/Python
${
PYTHON_LIBRARY_SUFFIX
}
.lib"
)
# when run in a venv, PYTHON_PREFIX points to it. But the libraries remain in the
# original python installation. They may be found relative to PYTHON_INCLUDE_DIR.
if
(
NOT EXISTS
"
${
PYTHON_LIBRARY
}
"
)
get_filename_component
(
_PYTHON_ROOT
${
PYTHON_INCLUDE_DIR
}
DIRECTORY
)
set
(
PYTHON_LIBRARY
"
${
_PYTHON_ROOT
}
/libs/Python
${
PYTHON_LIBRARY_SUFFIX
}
.lib"
)
endif
()
# raise an error if the python libs are still not found.
if
(
NOT EXISTS
"
${
PYTHON_LIBRARY
}
"
)
message
(
FATAL_ERROR
"Python libraries not found"
)
endif
()
elseif
(
APPLE
)
elseif
(
APPLE
)
set
(
PYTHON_LIBRARY
set
(
PYTHON_LIBRARY
"
${
PYTHON_PREFIX
}
/lib/libpython
${
PYTHON_LIBRARY_SUFFIX
}
.dylib"
)
"
${
PYTHON_PREFIX
}
/lib/libpython
${
PYTHON_LIBRARY_SUFFIX
}
.dylib"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment