Skip to content

Commit afa0bd5

Browse files
daverigbyfacebook-github-bot
authored andcommitted
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: facebook/folly#1479 Reviewed By: yfeldblum Differential Revision: D24503510 Pulled By: Orvid fbshipit-source-id: 705df05a4a3d7df2df8af3bb66c319fb044adbce
1 parent 9e00bb0 commit afa0bd5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build/fbcode_builder/CMake/FindGlog.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
# GLOG_LIBRARIES - link these to use Glog
88

99
include(FindPackageHandleStandardArgs)
10+
include(SelectLibraryConfigurations)
1011

11-
find_library(GLOG_LIBRARY glog
12+
find_library(GLOG_LIBRARY_RELEASE glog
13+
PATHS ${GLOG_LIBRARYDIR})
14+
find_library(GLOG_LIBRARY_DEBUG glogd
1215
PATHS ${GLOG_LIBRARYDIR})
1316

1417
find_path(GLOG_INCLUDE_DIR glog/logging.h
1518
PATHS ${GLOG_INCLUDEDIR})
1619

20+
select_library_configurations(GLOG)
21+
1722
find_package_handle_standard_args(glog DEFAULT_MSG
1823
GLOG_LIBRARY
1924
GLOG_INCLUDE_DIR)

0 commit comments

Comments
 (0)