Add error message for users trying to build dlib as a standalone dll in visual studio.

This commit is contained in:
Davis King 2018-09-29 08:01:42 -04:00
parent fe10f254f5
commit a6ac55ad40
1 changed files with 5 additions and 0 deletions

View File

@ -82,6 +82,11 @@ if (DLIB_IN_PROJECT_BUILD)
# Tell cmake to build dlib as a static library # Tell cmake to build dlib as a static library
set(BUILD_SHARED_LIBS false) set(BUILD_SHARED_LIBS false)
elseif(BUILD_SHARED_LIBS)
if (MSVC)
message(FATAL_ERROR "Building dlib as a standalone dll is not supported when using Visual Studio. You are highly encouraged to use static linking instead. See https://github.com/davisking/dlib/issues/1483 for a discussion.")
endif()
endif() endif()