Skip to content

Commit

Permalink
Fix missing gflags shlwapi dependency on MinGW.
Browse files Browse the repository at this point in the history
- Reported by Simeon ([email protected]) on Ceres mailing list.

Change-Id: If23491128fb6320d9b643eb3d5db7d9e67ffcf0b
  • Loading branch information
alexsmac committed Mar 24, 2015
1 parent 26f50e1 commit b611bde
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/FindGflags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,15 @@ ENDIF (NOT GFLAGS_LIBRARY OR
# detect threads, we assume that gflags requires it.
FIND_PACKAGE(Threads QUIET)
SET(GFLAGS_LINK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
# On Windows, the Shlwapi library is used by gflags if available.
IF (MSVC)
# On Windows (including MinGW), the Shlwapi library is used by gflags if
# available.
IF (WIN32)
INCLUDE(CheckIncludeFileCXX)
CHECK_INCLUDE_FILE_CXX("shlwapi.h" HAVE_SHLWAPI)
IF (HAVE_SHLWAPI)
LIST(APPEND GFLAGS_LINK_LIBRARIES shlwapi.lib)
ENDIF(HAVE_SHLWAPI)
ENDIF (MSVC)
ENDIF (WIN32)

# Mark internally as found, then verify. GFLAGS_REPORT_NOT_FOUND() unsets
# if called.
Expand Down

0 comments on commit b611bde

Please sign in to comment.