Commit 4f55291b authored by Davis King's avatar Davis King

Made cmake file a little more convenient when used in large projects.

parent 24872a6a
# Don't add dlib if it's already been added to the cmake project
if (NOT TARGET dlib)
# Determine the path to dlib.
string(REPLACE "cmake" "" dlib_path ${CMAKE_CURRENT_LIST_FILE})
# Determine the path to dlib.
string(REPLACE "cmake" "" dlib_path ${CMAKE_CURRENT_LIST_FILE})
if (CMAKE_COMPILER_IS_GNUCXX)
if (CMAKE_COMPILER_IS_GNUCXX)
# By default, g++ won't warn or error if you forget to return a value in a
# function which requires you to do so. This option makes it give a warning
# for doing this.
add_definitions("-Wreturn-type")
endif()
endif()
# Add folder containing dlib to the include search path.
INCLUDE_DIRECTORIES(${dlib_path}/..)
# Add folder containing dlib to the include search path.
INCLUDE_DIRECTORIES(${dlib_path}/..)
# This is really optional, but nice. It will make sure the build mode
# created by cmake is always release by default.
include(${dlib_path}/release_build_by_default)
# This is really optional, but nice. It will make sure the build mode
# created by cmake is always release by default.
include(${dlib_path}/release_build_by_default)
add_subdirectory(${dlib_path} dlib_build)
endif()
add_subdirectory(${dlib_path} dlib_build)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment