Commit 5fd7f424 authored by Dave Rigby's avatar Dave Rigby Committed by Facebook GitHub Bot

FindGlog: Add support for 'glogd' Debug library (#1479)

Summary:
Glog v0.4.0 when configured with Debug build type adds a 'd' suffix to
the library file. This results in FindGlog.cmake failing to locate it.

Update FindGlog.cmake to use check for 'glogd', and use
select_library_configurations() to set GLOG_LIBRARY to the correct
found filename.

(Note: this has no effect if a non-Debug type is used.)

Pull Request resolved: https://github.com/facebook/folly/pull/1479

Reviewed By: yfeldblum

Differential Revision: D24503510

Pulled By: Orvid

fbshipit-source-id: 705df05a4a3d7df2df8af3bb66c319fb044adbce
parent 1592db4a
...@@ -7,13 +7,18 @@ ...@@ -7,13 +7,18 @@
# GLOG_LIBRARIES - link these to use Glog # GLOG_LIBRARIES - link these to use Glog
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)
find_library(GLOG_LIBRARY glog find_library(GLOG_LIBRARY_RELEASE glog
PATHS ${GLOG_LIBRARYDIR})
find_library(GLOG_LIBRARY_DEBUG glogd
PATHS ${GLOG_LIBRARYDIR}) PATHS ${GLOG_LIBRARYDIR})
find_path(GLOG_INCLUDE_DIR glog/logging.h find_path(GLOG_INCLUDE_DIR glog/logging.h
PATHS ${GLOG_INCLUDEDIR}) PATHS ${GLOG_INCLUDEDIR})
select_library_configurations(GLOG)
find_package_handle_standard_args(glog DEFAULT_MSG find_package_handle_standard_args(glog DEFAULT_MSG
GLOG_LIBRARY GLOG_LIBRARY
GLOG_INCLUDE_DIR) GLOG_INCLUDE_DIR)
......
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