Skip to content

Update CMakeLists.txt#3109

Closed
Sahil-pixel wants to merge 1 commit into
davisking:masterfrom
Sahil-pixel:master
Closed

Update CMakeLists.txt#3109
Sahil-pixel wants to merge 1 commit into
davisking:masterfrom
Sahil-pixel:master

Conversation

@Sahil-pixel

Copy link
Copy Markdown

@davisking davisking left a comment

Copy link
Copy Markdown
Owner

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.

Comment on lines -4 to -12
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()

Copy link
Copy Markdown
Owner

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

Copy link
Copy Markdown
Owner

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.

@Novfensec

Novfensec commented Aug 23, 2025

Copy link
Copy Markdown

@davisking This PR is not the way we build different libs for Android. We actually use .patch files to patch libs accordingly based on the current android system requirements which changes frequently.

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

@dlib-issue-bot

Copy link
Copy Markdown
Collaborator

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.

@dlib-issue-bot

Copy link
Copy Markdown
Collaborator

Warning: this issue has been inactive for 43 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.

@dlib-issue-bot

Copy link
Copy Markdown
Collaborator

Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants