Skip to content

Commit

Permalink
Fix shared lib build with new YAML_BUILD_SHARED_LIBS option (jbeder#737)
Browse files Browse the repository at this point in the history
  • Loading branch information
asmaloney authored and jbeder committed Sep 15, 2019
1 parent b218787 commit 968e0c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ set(_INSTALL_DESTINATIONS
###
### Library
###
add_library(yaml-cpp ${library_sources})
if(YAML_BUILD_SHARED_LIBS)
add_library(yaml-cpp SHARED ${library_sources})
else()
add_library(yaml-cpp STATIC ${library_sources})
endif()

if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
target_include_directories(yaml-cpp
Expand Down

0 comments on commit 968e0c1

Please sign in to comment.