Merge branch 'abhikeshav-master'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3485de1..ce1419e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,6 +105,16 @@
src/xml.h
src/dict.h)
+# create static libyang library
+if(STATIC)
+ add_library(yang_static STATIC ${libsrc})
+ set_target_properties(yang_static PROPERTIES OUTPUT_NAME yang)
+ target_link_libraries(yang_static m)
+ target_link_libraries(yang_static ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(yang_static ${PCRE_LIBRARIES})
+ install(TARGETS yang_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
+endif(STATIC)
+
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
add_library(yangobj OBJECT ${libsrc})
add_library(yang SHARED $<TARGET_OBJECTS:yangobj>)