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
5dda15b9
Commit
5dda15b9
authored
Apr 20, 2013
by
Davis King
Browse files
Updated CMakeLists.txt so it tries to link with fftw if it is installed.
parent
e9a66e03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
dlib/CMakeLists.txt
dlib/CMakeLists.txt
+19
-0
No files found.
dlib/CMakeLists.txt
View file @
5dda15b9
...
...
@@ -68,6 +68,8 @@ if (NOT TARGET dlib)
"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"
)
set
(
DLIB_LINK_WITH_FFTW_STR
"Disable this if you don't want to link against fftw"
)
option
(
DLIB_ISO_CPP_ONLY
${
DLIB_ISO_CPP_ONLY_STR
}
OFF
)
option
(
DLIB_NO_GUI_SUPPORT
${
DLIB_NO_GUI_SUPPORT_STR
}
OFF
)
...
...
@@ -78,6 +80,7 @@ if (NOT TARGET dlib)
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_SQLITE3
${
DLIB_LINK_WITH_SQLITE3_STR
}
ON
)
option
(
DLIB_LINK_WITH_FFTW
${
DLIB_LINK_WITH_FFTW_STR
}
ON
)
add_library
(
dlib STATIC all/source.cpp
)
...
...
@@ -215,6 +218,22 @@ if (NOT TARGET dlib)
endif
()
if
(
DLIB_LINK_WITH_FFTW
)
find_library
(
fftw fftw3
)
# make sure fftw3.h is in the include path
find_path
(
fftw_path fftw3.h
)
if
(
fftw AND fftw_path
)
get_filename_component
(
fftw_path2
${
fftw_path
}
PATH CACHE
)
include_directories
(
${
fftw_path2
}
)
set
(
dlib_needed_libraries
${
dlib_needed_libraries
}
${
fftw
}
)
else
()
set
(
DLIB_LINK_WITH_FFTW OFF CACHE STRING
${
DLIB_LINK_WITH_SQLITE3_STR
}
FORCE
)
endif
()
mark_as_advanced
(
fftw fftw_path fftw_path2
)
endif
()
target_link_libraries
(
dlib
${
dlib_needed_libraries
}
)
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