projects
/
platform
/
upstream
/
gflags.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e1c5ce
)
Use GFLAGS_IS_A_DLL=1 in public headers if BUILD_SHARED_LIBS is enabled (Fixes issue...
author
Andreas Schuh
<andreas.schuh.84@gmail.com>
Tue, 25 Mar 2014 15:29:56 +0000
(15:29 +0000)
committer
Andreas Schuh
<andreas.schuh.84@gmail.com>
Tue, 25 Mar 2014 15:29:56 +0000
(15:29 +0000)
CMakeLists.txt
patch
|
blob
|
history
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
93d3a73
..
7ada98c
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-197,6
+197,15
@@
else ()
set (GFLAGS_ATTRIBUTE_UNUSED)
endif ()
set (GFLAGS_ATTRIBUTE_UNUSED)
endif ()
+# whenever we build a shared library (DLL on Windows), configure the public
+# headers of the API for use of this library rather than the optionally
+# also build statically linked library; users can override GFLAGS_DLL_DECL
+if (BUILD_SHARED_LIBS)
+ set (GFLAGS_IS_A_DLL 1)
+else ()
+ set (GFLAGS_IS_A_DLL 0)
+endif ()
+
configure_headers (PUBLIC_HDRS ${PUBLIC_HDRS})
configure_sources (PRIVATE_HDRS ${PRIVATE_HDRS})
configure_sources (GFLAGS_SRCS ${GFLAGS_SRCS})
configure_headers (PUBLIC_HDRS ${PUBLIC_HDRS})
configure_sources (PRIVATE_HDRS ${PRIVATE_HDRS})
configure_sources (GFLAGS_SRCS ${GFLAGS_SRCS})