# HG changeset patch
# User John Kirkham <kirkhamj@janelia.hhmi.org>
# Date 1464840988 14400
#      Thu Jun 02 00:16:28 2016 -0400
# Node ID 27d610b7569b3ab5edb4421a4651621770392311
# Parent  e058c31948ace1dc5dae7818caa04e494cadc569
cmake: Provide support for building dynamic and static libraries.

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@
 file (GLOB SRC src/*.c)
 
 include_directories (include win32)
-add_definitions (-DHAVE_CONFIG_H -DYAML_DECLARE_STATIC)
-add_library (yaml STATIC ${SRC})
-
+add_library (yaml SHARED ${SRC})
+set_target_properties(yaml PROPERTIES COMPILE_FLAGS "-DYAML_DECLARE_EXPORT -DHAVE_CONFIG_H")
+add_library (yaml_static STATIC ${SRC})
+set_target_properties(yaml_static PROPERTIES COMPILE_FLAGS "-DYAML_DECLARE_STATIC -DHAVE_CONFIG_H")
\ No newline at end of file