diff options
author | John Kirkham <kirkhamj@janelia.hhmi.org> | 2016-06-02 00:16:28 -0400 |
---|---|---|
committer | Ingy döt Net <ingy@ingy.net> | 2016-12-02 17:51:10 -0800 |
commit | 974ef1ac5279069f2a919b8f40a1b6d148021644 (patch) | |
tree | ddb686178a31e4736c7277ffb11c4d5e88d3278b | |
parent | e4fd0393e6e97439666527db71c1fa18482778a7 (diff) | |
download | libyaml-git-issue/10.tar.gz |
cmake: Provide support for building dynamic and static libraries.issue/10
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bfe761..fe88a28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ set (YAML_VERSION_STRING "${YAML_VERSION_MAJOR}.${YAML_VERSION_MINOR}.${YAML_VER 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 |