Skip to content

Commit 427259f

Browse files
committed
Merge branch 'master' of https://github.com/abhikeshav/libyang into abhikeshav-master
2 parents dbbd973 + 7afa081 commit 427259f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ set(headers
105105
src/xml.h
106106
src/dict.h)
107107

108+
# create static libyang library
109+
if(STATIC)
110+
add_library(yang_static STATIC ${libsrc})
111+
set_target_properties(yang_static PROPERTIES OUTPUT_NAME yang)
112+
target_link_libraries(yang_static m)
113+
target_link_libraries(yang_static ${CMAKE_THREAD_LIBS_INIT})
114+
target_link_libraries(yang_static ${PCRE_LIBRARIES})
115+
install(TARGETS yang_static DESTINATION ${LIB_INSTALL_DIR})
116+
endif(STATIC)
117+
108118
set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
109119
add_library(yangobj OBJECT ${libsrc})
110120
add_library(yang SHARED $<TARGET_OBJECTS:yangobj>)

0 commit comments

Comments
 (0)