Skip to content

Commit

Permalink
cmake: Provide support for building dynamic and static libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Jun 2, 2016
1 parent e6aa721 commit dfae984
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit dfae984

Please sign in to comment.