File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ endif()
118
118
# QuickJS library
119
119
#
120
120
121
+ xoption(BUILD_QJS_LIBC "Build standard library modules as part of the library" OFF )
122
+
121
123
set (qjs_sources
122
124
cutils.c
123
125
libbf.c
@@ -126,6 +128,9 @@ set(qjs_sources
126
128
quickjs.c
127
129
)
128
130
131
+ if (BUILD_QJS_LIBC)
132
+ list (APPEND qjs_sources quickjs-libc.c)
133
+ endif ()
129
134
list (APPEND qjs_defines _GNU_SOURCE)
130
135
list (APPEND qjs_libs qjs m pthread)
131
136
if (NOT MINGW)
@@ -299,6 +304,9 @@ set_target_properties(qjs PROPERTIES
299
304
SOVERSION ${QJS_VERSION_MAJOR}
300
305
)
301
306
install (FILES quickjs.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
307
+ if (BUILD_QJS_LIBC)
308
+ install (FILES quickjs-libc.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} )
309
+ endif ()
302
310
install (TARGETS qjs_exe RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
303
311
install (TARGETS qjs EXPORT qjsConfig
304
312
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
You can’t perform that action at this time.
0 commit comments