projects
/
platform
/
upstream
/
glog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95cde7a
)
cmake: support gflags in static builds
author
Sergiu Dotenco
<sergiu.dotenco@gmail.com>
Mon, 20 Apr 2015 20:51:42 +0000
(22:51 +0200)
committer
Sergiu Dotenco
<sergiu.dotenco@gmail.com>
Wed, 15 Jul 2015 20:35:01 +0000
(22:35 +0200)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index e6941286c3026cef0de981df82cd2b1b6894fb71..cb0b16c6ec8f6d9a36eb48b5471aebe85d2ed62a 100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-370,6
+370,11
@@
endif (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS)
if (gflags_FOUND)
target_include_directories (glog PUBLIC ${gflags_INCLUDE_DIR})
target_link_libraries (glog PUBLIC ${gflags_LIBRARIES})
+
+ if (NOT BUILD_SHARED_LIBS)
+ # Don't use __declspec(dllexport|dllimport) if this is a static build
+ targeT_compile_definitions (glog PUBLIC GFLAGS_DLL_DECLARE_FLAG= GFLAGS_DLL_DEFINE_FLAG=)
+ endif (NOT BUILD_SHARED_LIBS)
endif (gflags_FOUND)
set_target_properties (glog PROPERTIES VERSION ${GLOG_MAJOR_VERSION})