File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,12 @@ add_library(libhl SHARED
136
136
${std_srcs}
137
137
)
138
138
139
+ add_library (libhl-static STATIC
140
+ ${pcre_srcs}
141
+ src/gc.c
142
+ ${std_srcs}
143
+ )
144
+
139
145
set (public_headers
140
146
src/hl.h
141
147
src/hlc.h
@@ -146,16 +152,29 @@ set_target_properties(libhl
146
152
PUBLIC_HEADER "${public_headers} "
147
153
)
148
154
155
+ set_target_properties (libhl-static
156
+ PROPERTIES
157
+ PUBLIC_HEADER "${public_headers} "
158
+ )
159
+
149
160
if (WIN32 )
150
161
set_target_properties (libhl
151
162
PROPERTIES
152
163
OUTPUT_NAME libhl
153
164
)
165
+ set_target_properties (libhl-static
166
+ PROPERTIES
167
+ OUTPUT_NAME libhl-static
168
+ )
154
169
else ()
155
170
set_target_properties (libhl
156
171
PROPERTIES
157
172
OUTPUT_NAME hl
158
173
)
174
+ set_target_properties (libhl-static
175
+ PROPERTIES
176
+ OUTPUT_NAME hl
177
+ )
159
178
endif ()
160
179
161
180
set_target_properties (libhl
@@ -165,6 +184,11 @@ set_target_properties(libhl
165
184
COMPILE_DEFINITIONS "_USRDLL;LIBHL_EXPORTS;HAVE_CONFIG_H;PCRE2_CODE_UNIT_WIDTH=16"
166
185
)
167
186
187
+ set_target_properties (libhl-static
188
+ PROPERTIES
189
+ COMPILE_DEFINITIONS "_USRDLL;LIBHL_EXPORTS;HAVE_CONFIG_H;PCRE2_CODE_UNIT_WIDTH=16"
190
+ )
191
+
168
192
add_executable (hl
169
193
src/code.c
170
194
src/jit.c
@@ -355,6 +379,7 @@ install(
355
379
TARGETS
356
380
hl
357
381
libhl
382
+ libhl-static
358
383
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
359
384
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
360
385
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
You can’t perform that action at this time.
0 commit comments