From a6ac55ad400689289164ea2aba89ea3c26012b19 Mon Sep 17 00:00:00 2001 From: Davis King Date: Sat, 29 Sep 2018 08:01:42 -0400 Subject: [PATCH] Add error message for users trying to build dlib as a standalone dll in visual studio. --- dlib/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt index a4b68e868..6c7299e49 100644 --- a/dlib/CMakeLists.txt +++ b/dlib/CMakeLists.txt @@ -82,6 +82,11 @@ if (DLIB_IN_PROJECT_BUILD) # Tell cmake to build dlib as a static library 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()