diff --git a/cmake/iotjs.cmake b/cmake/iotjs.cmake index cdd3d2f918..4b424212f2 100644 --- a/cmake/iotjs.cmake +++ b/cmake/iotjs.cmake @@ -497,6 +497,9 @@ set(IOTJS_PUBLIC_HEADERS # Configure the libiotjs set(TARGET_LIB_IOTJS libiotjs) +# Configure the libiotjs.a +set(TARGET_STATIC_IOTJS libiotjs) + if(CREATE_SHARED_LIB) add_library(${TARGET_LIB_IOTJS} SHARED ${LIB_IOTJS_SRC}) else() @@ -553,7 +556,13 @@ target_link_libraries(${TARGET_LIB_IOTJS} ${MBEDTLS_LIBS} ${EXTERNAL_LIBS} ) - +target_link_libraries(${TARGET_STATIC_IOTJS} + ${JERRY_LIBS} + ${TUV_LIBS} + libhttp-parser + ${MBEDTLS_LIBS} + ${EXTERNAL_LIBS} +) if("${LIB_INSTALL_DIR}" STREQUAL "") set(LIB_INSTALL_DIR "lib") endif() @@ -580,6 +589,7 @@ if(NOT BUILD_LIB_ONLY) RUNTIME DESTINATION "${INSTALL_PREFIX}/bin" LIBRARY DESTINATION "${INSTALL_PREFIX}/lib" PUBLIC_HEADER DESTINATION "${INSTALL_PREFIX}/include/iotjs") + install(TARGETS ${TARGET_LIB_IOTJS} DESTINATION ${LIB_INSTALL_DIR}) if(CREATE_SHARED_LIB) install(TARGETS ${TARGET_LIB_IOTJS} RUNTIME DESTINATION "${INSTALL_PREFIX}/bin"