-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow TIFF, LZO, and SuperLU libraries to be found when compiling for… #37
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# looks for libtiff(4.0.3 modified) | ||
find_path(TIFF_INCLUDE_DIR NAMES tiffio.h HINTS ${SDKROOT} PATH_SUFFIXES tiff-4.0.3/libtiff/) | ||
find_library(TIFF_LIBRARY NAMES libtiff.a HINTS ${SDKROOT} PATH_SUFFIXES tiff-4.0.3/libtiff/.libs NO_DEFAULT_PATH) | ||
find_path(TIFF_INCLUDE_DIR NAMES tiffio.h HINTS ${SDKROOT} /usr/include/i386-linux-gnu/ /usr/include/x86_64-linux-gnu/ PATH_SUFFIXES tiff-4.0.3/libtiff/) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a concept, using the shared libraries already on the system is probably a decent idea. It might be better to use pkgconfig to retrieve the locations/flags though, as that's already a dependency + should be more cross platform compatible. As an example on OSX:
Those values should be usable to pass into appropriate variables. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And to use within cmake: https://cmake.org/cmake/help/v3.0/module/FindPkgConfig.html |
||
find_library(TIFF_LIBRARY NAMES libtiff.a HINTS ${SDKROOT} /usr/include/i386-linux-gnu/ /usr/lib/x86_64-linux-gnu/ PATH_SUFFIXES tiff-4.0.3/libtiff/.libs NO_DEFAULT_PATH) | ||
|
||
message("***** libtiff Header path:" ${TIFF_INCLUDE_DIR}) | ||
message("***** libtiff Libarary path:" ${TIFF_LIBRARY}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find_library() shouldn't use either "i386-linux-gnu" nor "x86_64-linux-gnu" directly because it won't work for the other CPU architectures such as ARM. Instead, CMAKE_LIBRARY_ARCHITECTURE variable can be used here.