]> andersk Git - libyaml.git/commitdiff
cmake: Provide support for building dynamic and static libraries.
authorJohn Kirkham <kirkhamj@janelia.hhmi.org>
Thu, 2 Jun 2016 04:16:28 +0000 (00:16 -0400)
committerJohn Kirkham <kirkhamj@janelia.hhmi.org>
Wed, 22 Feb 2017 05:00:03 +0000 (00:00 -0500)
CMakeLists.txt

index 40db8824ecb25e63a91a19389464cc07df5a67c0..e47f5ef4d11b46b4676d86304bdd7531f50f1954 100644 (file)
@@ -11,8 +11,11 @@ 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")
 
 add_executable (test-version tests/test-version.c)
 target_link_libraries(test-version yaml)
This page took 0.039389 seconds and 5 git commands to generate.