Don't build miniglog unconditionally as a static library
This is only needed on Windows because of lacking dllexport's.
Change-Id: I7ee4b3fd640d5870af2a73d7bfa6ccc8356b2fa0
diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt
index dd75a01..dd48ab7 100644
--- a/internal/ceres/CMakeLists.txt
+++ b/internal/ceres/CMakeLists.txt
@@ -138,7 +138,13 @@
# Primarily for Android, but optionally for others, use the minimal internal
# Glog implementation.
IF (MINIGLOG)
- ADD_LIBRARY(miniglog STATIC miniglog/glog/logging.cc)
+ IF (MSVC)
+ # Miniglog needs to be built statically with Visual Studio since it
+ # doesn't export any symbols with dllexport/dllimport.
+ ADD_LIBRARY(miniglog STATIC miniglog/glog/logging.cc)
+ ELSE()
+ ADD_LIBRARY(miniglog miniglog/glog/logging.cc)
+ ENDIF()
INSTALL(TARGETS miniglog
EXPORT CeresExport
RUNTIME DESTINATION bin