summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLloyd Hilaiel <lloyd@hilaiel.com>2009-12-18 10:06:31 -0800
committerLloyd Hilaiel <lloyd@hilaiel.com>2009-12-18 10:06:31 -0800
commit23d3ce0cca855aaf4a47597c20fd556e53ef0091 (patch)
treea2bff0e083adec3853739dfb80e618c8c38f5fb8
parentc84845b0263b9446c35118140e9daaaa921a74fa (diff)
downloadyajl-23d3ce0cca855aaf4a47597c20fd556e53ef0091.tar.gz
ensure proper preprocessor directives are defined during building of .dll on win32 to trigger dllexports tomfoolery
-rw-r--r--src/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 59027cb..d05e16e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -36,6 +36,11 @@ SET (PUB_HDRS api/yajl_parse.h api/yajl_gen.h api/yajl_common.h)
# useful when fixing lexer bugs.
#ADD_DEFINITIONS(-DYAJL_LEXER_DEBUG)
+# Ensure defined when building YAJL (as opposed to using it from
+# another project). Used to ensure correct function export when
+# building win32 DLL.
+ADD_DEFINITIONS(-DYAJL_BUILD)
+
# set up some paths
SET (libDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib)
SET (incDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/include/yajl)
@@ -49,6 +54,7 @@ ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS})
#### setup shared library version number
SET_TARGET_PROPERTIES(yajl PROPERTIES
+ DEFINE_SYMBOL YAJL_SHARED
SOVERSION ${YAJL_MAJOR}
VERSION ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO})