-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Update CMakeLists.txt #3109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update CMakeLists.txt #3109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Please make only the minimal changes needed though.
if (WIN32 AND NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio") | ||
message(FATAL_ERROR "\n" | ||
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" | ||
"You must use Visual Studio to build a python extension on windows. If you " | ||
"are getting this error it means you have not installed Visual C++. Note that " | ||
"there are many flavors of Visual Studio, like Visual Studio for C\# development. " | ||
"You need to install Visual Studio for C++. \n" | ||
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n") | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very much needed for windows users.
# When invoked from setup.py CMAKE_LIBRARY_OUTPUT_DIRECTORY will be set. But when you are just building via say | ||
# `cd dlib/tools/python; mkdir build; cd build; cmake ..` it won't be set. It only matters for building the actual | ||
# distribution. So skip this for people building directly with cmake (which they might do when testing stuff). | ||
# Copy __init__.py for Python package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't remove comments.
@davisking This PR is not the way we build different libs for Android. We actually use See https://python-for-android.readthedocs.io/en/latest/recipes.html#methods-and-tools-to-help-with-compilation for more info. Below is just a copy if this |
Warning: this issue has been inactive for 35 days and will be automatically closed on 2025-10-07 if there is no further activity. If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search. |
#3106