Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
c7b5b9e8
Commit
c7b5b9e8
authored
Feb 10, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a simple cmake script users can use to simplify their own CMakeLists.txt scripts
parent
d2cfcb7b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
13 deletions
+22
-13
cmake
dlib/cmake
+20
-0
CMakeLists.txt
tools/imglab/CMakeLists.txt
+2
-13
No files found.
dlib/cmake
0 → 100644
View file @
c7b5b9e8
# Determine the path to dlib.
string(REPLACE "cmake" "" dlib_path ${CMAKE_CURRENT_LIST_FILE})
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()
# 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)
add_subdirectory(${dlib_path} dlib_build)
tools/imglab/CMakeLists.txt
View file @
c7b5b9e8
...
@@ -27,23 +27,12 @@ ADD_EXECUTABLE(${target_name}
...
@@ -27,23 +27,12 @@ ADD_EXECUTABLE(${target_name}
)
)
# Tell cmake to link our target executable dlib.
# add the folder containing the dlib folder to the include path
include
(
../../dlib/cmake
)
INCLUDE_DIRECTORIES
(
../..
)
# There is a CMakeLists.txt file in the dlib source folder that tells cmake
# how to build the dlib library. Tell cmake about that file.
add_subdirectory
(
../../dlib dlib_build
)
# Tell cmake to link our target executable to the non-gui version of the dlib
# library.
TARGET_LINK_LIBRARIES
(
${
target_name
}
dlib
)
TARGET_LINK_LIBRARIES
(
${
target_name
}
dlib
)
INSTALL
(
TARGETS
${
target_name
}
INSTALL
(
TARGETS
${
target_name
}
RUNTIME DESTINATION bin
RUNTIME DESTINATION bin
)
)
#set default build type to Release
include
(
../../dlib/release_build_by_default
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment