@@ -67,17 +67,33 @@ if(OS_WINDOWS)
67
67
QCEFVIEW_LIB
68
68
)
69
69
70
- target_link_options (QCefView PRIVATE
71
- "/DELAYLOAD:libcef.dll"
72
- )
73
-
74
- target_link_libraries (QCefView
75
- PRIVATE
76
- d3d11
77
- d3dcompiler
78
- dcomp
79
- delayimp
80
- )
70
+ if (BUILD_STATIC)
71
+ target_link_options (QCefView
72
+ PUBLIC
73
+ "/DELAYLOAD:libcef.dll"
74
+ )
75
+
76
+ target_link_libraries (QCefView
77
+ PUBLIC
78
+ d3d11
79
+ d3dcompiler
80
+ dcomp
81
+ delayimp
82
+ )
83
+ else ()
84
+ target_link_options (QCefView
85
+ PRIVATE
86
+ "/DELAYLOAD:libcef.dll"
87
+ )
88
+
89
+ target_link_libraries (QCefView
90
+ PRIVATE
91
+ d3d11
92
+ d3dcompiler
93
+ dcomp
94
+ delayimp
95
+ )
96
+ endif ()
81
97
82
98
add_custom_command (TARGET QCefView
83
99
PRE_BUILD
@@ -168,11 +184,20 @@ if(OS_MACOS)
168
184
169
185
find_library (METAL_FRAMEWORK Metal)
170
186
find_library (QUARTZCORE_FRAMEWORK QuartzCore)
171
- target_link_libraries (QCefView
172
- PRIVATE
173
- ${METAL_FRAMEWORK}
174
- ${QUARTZCORE_FRAMEWORK}
175
- )
187
+ if (BUILD_STATIC)
188
+ target_link_libraries (QCefView
189
+ PUBLIC
190
+ ${METAL_FRAMEWORK}
191
+ ${QUARTZCORE_FRAMEWORK}
192
+ )
193
+ else ()
194
+ target_link_libraries (QCefView
195
+ PRIVATE
196
+ ${METAL_FRAMEWORK}
197
+ ${QUARTZCORE_FRAMEWORK}
198
+ )
199
+ endif ()
200
+
176
201
177
202
set_target_properties (QCefView
178
203
PROPERTIES
@@ -231,13 +256,23 @@ add_dependencies(QCefView
231
256
CefViewCore::CefViewCore
232
257
)
233
258
259
+ if (BUILD_STATIC)
260
+ target_link_libraries (QCefView
261
+ PUBLIC
262
+ CefViewCore::CefViewCore
263
+ )
264
+ else ()
265
+ target_link_libraries (QCefView
266
+ PRIVATE
267
+ CefViewCore::CefViewCore
268
+ )
269
+ endif ()
270
+
234
271
target_link_libraries (QCefView
235
272
PUBLIC
236
273
Qt${QT_VERSION_MAJOR} ::Gui
237
274
Qt${QT_VERSION_MAJOR} ::Core
238
275
Qt${QT_VERSION_MAJOR} ::Widgets
239
- PRIVATE
240
- CefViewCore::CefViewCore
241
276
)
242
277
243
278
# install QCefView files
0 commit comments