Commit Graph

5 Commits

Author SHA1 Message Date
Davis E. King
61f747de5a
Only define one dlib target in CMake and shared vs. static is determined by BUILD_SHARED_LIBS variable. (#1138)
* Changed cmake so that there is only the dlib target and it isn't forced
to be static or shared, instead, the build type will toggle based on the
state of CMake's BUILD_SHARED_LIBS variable.

* Make CMake build dlib statically whenever DLIB_IN_PROJECT_BUILD==true,
regardless of the state of BUILD_SHARED_LIBS.  This means projects that
use dlib by saying add_subdirectory(dlib) will always statically link to
dlib, unless DLIB_IN_PROJECT_BUILD is explicltly set to false and
BUILD_SHARED_LIBS set to true.
2018-02-27 22:39:20 -05:00
Davis King
bc37789144 Made top level cmake file not build a shared library if part of a subproject. 2017-10-29 08:42:02 -04:00
Davis King
3b2d73db68 Some cmake script cleanup and refactoring. 2017-10-16 20:55:28 -04:00
Alain Vaucher
574446aec2 Move new CMake code to better position 2017-02-27 18:22:50 +01:00
Taylor Braun-Jones
378431eeea Support building dlib from a top-level CMakeLists file
This follows convention which simplifies using dlib as a CMake
ExternalProject.
2016-02-26 08:53:49 -05:00