Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
ac76165e
Commit
ac76165e
authored
Sep 23, 2011
by
Davis King
Browse files
setup cmake file to link against sqlite3 if it can find it.
parent
1757a047
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+16
-0
No files found.
dlib/CMakeLists.txt
View file @
ac76165e
...
@@ -57,6 +57,8 @@ set (DLIB_LINK_WITH_LIBPNG_STR
...
@@ -57,6 +57,8 @@ set (DLIB_LINK_WITH_LIBPNG_STR
"Disable this if you don't want to link against libpng"
)
"Disable this if you don't want to link against libpng"
)
set
(
DLIB_LINK_WITH_LIBJPEG_STR
set
(
DLIB_LINK_WITH_LIBJPEG_STR
"Disable this if you don't want to link against libjpeg"
)
"Disable this if you don't want to link against libjpeg"
)
set
(
DLIB_LINK_WITH_SQLITE3_STR
"Disable this if you don't want to link against sqlite3"
)
option
(
DLIB_ISO_CPP_ONLY
${
DLIB_ISO_CPP_ONLY_STR
}
OFF
)
option
(
DLIB_ISO_CPP_ONLY
${
DLIB_ISO_CPP_ONLY_STR
}
OFF
)
option
(
DLIB_NO_GUI_SUPPORT
${
DLIB_NO_GUI_SUPPORT_STR
}
OFF
)
option
(
DLIB_NO_GUI_SUPPORT
${
DLIB_NO_GUI_SUPPORT_STR
}
OFF
)
...
@@ -66,6 +68,7 @@ option(DLIB_USE_BLAS ${DLIB_USE_BLAS_STR} ON)
...
@@ -66,6 +68,7 @@ option(DLIB_USE_BLAS ${DLIB_USE_BLAS_STR} ON)
option
(
DLIB_USE_LAPACK
${
DLIB_USE_LAPACK_STR
}
ON
)
option
(
DLIB_USE_LAPACK
${
DLIB_USE_LAPACK_STR
}
ON
)
option
(
DLIB_LINK_WITH_LIBPNG
${
DLIB_LINK_WITH_LIBPNG_STR
}
ON
)
option
(
DLIB_LINK_WITH_LIBPNG
${
DLIB_LINK_WITH_LIBPNG_STR
}
ON
)
option
(
DLIB_LINK_WITH_LIBJPEG
${
DLIB_LINK_WITH_LIBJPEG_STR
}
ON
)
option
(
DLIB_LINK_WITH_LIBJPEG
${
DLIB_LINK_WITH_LIBJPEG_STR
}
ON
)
option
(
DLIB_LINK_WITH_SQLITE3
${
DLIB_LINK_WITH_SQLITE3_STR
}
ON
)
add_library
(
dlib STATIC all/source.cpp
)
add_library
(
dlib STATIC all/source.cpp
)
...
@@ -188,6 +191,19 @@ if (NOT DLIB_ISO_CPP_ONLY)
...
@@ -188,6 +191,19 @@ if (NOT DLIB_ISO_CPP_ONLY)
if
(
DLIB_LINK_WITH_SQLITE3
)
find_library
(
sqlite sqlite3
)
# make sure sqlite3.h is in the include path
find_path
(
sqlite_path sqlite3.h
)
if
(
sqlite AND sqlite_path
)
get_filename_component
(
sqlite_path2
${
sqlite_path
}
PATH CACHE
)
include_directories
(
${
sqlite_path2
}
)
set
(
dlib_needed_libraries
${
dlib_needed_libraries
}
${
sqlite
}
)
endif
()
mark_as_advanced
(
sqlite sqlite_path sqlite_path2
)
endif
()
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
endif
()
##### end of if NOT DLIB_ISO_CPP_ONLY ##########################################################
endif
()
##### end of if NOT DLIB_ISO_CPP_ONLY ##########################################################
...
...
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