-
Notifications
You must be signed in to change notification settings - Fork 48
/
CMakeLists.txt
486 lines (423 loc) · 15.9 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
cmake_minimum_required(VERSION 2.8.12)
PROJECT(facemask-plugin)
math(EXPR BITS "8*${CMAKE_SIZEOF_VOID_P}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
SET(PATH_DLIB "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/dlib")
set(DLIB_NO_GUI_SUPPORT OFF CACHE STRING "DLib GUI support" FORCE)
set(DLIB_GIF_SUPPORT OFF CACHE STRING "DLib GIF support" FORCE)
set(DLIB_JPEG_SUPPORT OFF CACHE STRING "DLib JPEG support" FORCE)
set(DLIB_PNG_SUPPORT OFF CACHE STRING "DLib PNG support" FORCE)
set(DLIB_USE_BLAS OFF CACHE STRING "DLib BLAS support" FORCE)
set(DLIB_USE_LAPACK OFF CACHE STRING "DLib LAPACK support" FORCE)
set(DLIB_USE_MKL_FFT OFF CACHE STRING "DLib MKL FFT support" FORCE)
set(DLIB_USE_MKL_SEQUENTIAL OFF CACHE STRING "DLib MKL Sequential support" FORCE)
set(DLIB_USE_MKL_WITH_TBB OFF CACHE STRING "DLib MKL with TBB support" FORCE)
SET(PATH_FREETYPE "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/freetype2")
################################################################################
# Configuration
################################################################################
# Distribute format
OPTION(BUILD_FOR_PUBLIC "Build for public release" ON)
if(BUILD_FOR_PUBLIC)
add_definitions(-DPUBLIC_RELEASE)
endif()
# dlib
if(PATH_DLIB STREQUAL "")
message(FATAL_ERROR "PATH_DLIB not set!")
return()
endif()
if(NOT EXISTS "${PATH_DLIB}/dlib/image_processing/object_detector.h")
message(FATAL_ERROR "PATH_DLIB is invalid!")
return()
endif()
include(${PATH_DLIB}/dlib/cmake)
include_directories(${PATH_DLIB})
if(BUILD_FOR_PUBLIC)
OPTION(BUILD_UNIT_TESTS "Build Unit tests for facemask plugin" ON)
else()
OPTION(BUILD_UNIT_TESTS "Build Unit tests for facemask plugin" OFF)
endif()
if(BUILD_UNIT_TESTS)
# CPPUTEST
SET(PATH_CPP_UTEST "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cpputest")
SET(EXTENSIONS OFF CACHE BOOL "Use the CppUTest extenstion library" FORCE)
SET(TESTS OFF CACHE BOOL "Compile and make tests for the code?" FORCE)
if(PATH_CPP_UTEST STREQUAL "")
message(FATAL_ERROR "PATH_CPP_UTEST not set!")
return()
endif()
if(NOT EXISTS "${PATH_CPP_UTEST}/include/CppUTest/MemoryLeakDetectorNewMacros.h")
message(FATAL_ERROR "PATH_CPP_UTEST is invalid!")
return()
endif()
add_subdirectory(${PATH_CPP_UTEST} ${PATH_CPP_UTEST})
include_directories(${PATH_CPP_UTEST})
endif()
# OpenCV
SET(OpenCV_DIR "${PROJECT_SOURCE_DIR}/thirdparty/opencv")
SET(OpenCV_VERSION "400" CACHE STRING "Version of OpenCV to use.")
SET(OpenCV_LIBS
debug "${OpenCV_DIR}/lib/Debug/opencv_world${OpenCV_VERSION}d.lib"
optimized "${OpenCV_DIR}/lib/Release/opencv_world${OpenCV_VERSION}.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/zlibd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/zlib.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/libpngd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/libpng.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/ittnotifyd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/ittnotify.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/ippiwd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/ippiw.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/IlmImfd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/IlmImf.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/libjpeg-turbod.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/libjpeg-turbo.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/libtiffd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/libtiff.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/libjasperd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/libjasper.lib"
debug "${OpenCV_DIR}/3rdparty/lib/Debug/libwebpd.lib"
optimized "${OpenCV_DIR}/3rdparty/lib/Release/libwebp.lib"
debug "${OpenCV_DIR}/3rdparty/ippicv/ippicv_win_${OpenCV_VERSION}/lib/intel64/ippicvmt.lib"
optimized "${OpenCV_DIR}/3rdparty/ippicv/ippicv_win_${OpenCV_VERSION}/lib/intel64/ippicvmt.lib"
)
include_directories("${OpenCV_DIR}/include")
# zlib
include_directories("${OpenCV_DIR}/3rdparty/include")
# intel IPP
include_directories("${OpenCV_DIR}/3rdparty/ippicv/ippicv_win_${OpenCV_VERSION}/include")
include_directories("${OpenCV_DIR}/3rdparty/ippicv/ippiw_win_${OpenCV_VERSION}/include")
# smll
include_directories("smll")
SET(SMLLDir "${PROJECT_SOURCE_DIR}/smll")
# tinyobjloader
include_directories("thirdparty/tinyobjloader")
SET(TINYOBJDir "thirdparty/tinyobjloader")
# freetype
if(PATH_FREETYPE STREQUAL "")
message(FATAL_ERROR "PATH_FREETYPE not set!")
return()
endif()
if(NOT EXISTS "${PATH_FREETYPE}/src/base/ftsystem.c")
message(FATAL_ERROR "PATH_FREETYPE is invalid!")
return()
endif()
SET(freetype_SOURCES
"${PATH_FREETYPE}/src/base/ftsystem.c"
"${PATH_FREETYPE}/src/base/ftinit.c"
"${PATH_FREETYPE}/src/base/ftdebug.c"
"${PATH_FREETYPE}/src/base/ftbase.c"
"${PATH_FREETYPE}/src/base/ftbbox.c"
"${PATH_FREETYPE}/src/base/ftglyph.c"
"${PATH_FREETYPE}/src/base/ftbitmap.c"
"${PATH_FREETYPE}/src/truetype/truetype.c"
"${PATH_FREETYPE}/src/smooth/smooth.c"
"${PATH_FREETYPE}/src/base/ftstroke.c"
"${PATH_FREETYPE}/src/sfnt/sfnt.c"
"${PATH_FREETYPE}/src/psnames/psnames.c"
"${PATH_FREETYPE}/src/autofit/autofit.c"
)
add_definitions(-DFT2_BUILD_LIBRARY)
include_directories(${PATH_FREETYPE}/include)
if(DEFINED ENV{FM_PLUGIN_APPVEYOR_BUILD})
SET(APPVEYOR_BUILD TRUE)
SET(libobs_SOURCE_DIR "c:/projects/source/build")
else()
SET(APPVEYOR_BUILD FALSE)
endif()
# OBS Studio
if(APPVEYOR_BUILD)
include("${libobs_SOURCE_DIR}/cmake/LibObs/LibObsConfig.cmake")
file(MAKE_DIRECTORY "libobs")
file(MAKE_DIRECTORY "deps")
file(COPY "${LIBOBS_INCLUDE_DIRS}/" DESTINATION "libobs" FILES_MATCHING PATTERN "*")
file(COPY "${libobs_SOURCE_DIR}/deps/" DESTINATION "deps" FILES_MATCHING PATTERN "*")
INCLUDE_DIRECTORIES("${LIBOBS_INCLUDE_DIRS}/")
else()
SET(PATH_OBS_STUDIO "" CACHE PATH "OBS Studio Source Code Directory")
if(PATH_OBS_STUDIO STREQUAL "")
message(FATAL_ERROR "PATH_OBS_STUDIO not set!")
return()
endif()
if(NOT EXISTS "${PATH_OBS_STUDIO}/libobs/obs-module.h")
message(FATAL_ERROR "PATH_OBS_STUDIO is invalid!")
return()
endif()
SET(obsPath "${PATH_OBS_STUDIO}")
INCLUDE("${PATH_OBS_STUDIO}/cmake/external/Findlibobs.cmake")
INCLUDE_DIRECTORIES("${PATH_OBS_STUDIO}/")
endif()
# Distribute format
SET(DISTRIBUTE_PATH "${PROJECT_BINARY_DIR}/distribute/slobs")
SET(DISTRIBUTE_PATH_BIN "obs-plugins")
add_definitions(-DSLOBS_BUILD)
################################################################################
# Setup
################################################################################
# Version
SET(VERSION_MAJOR 0)
SET(VERSION_MINOR 1)
SET(VERSION_PATCH 1)
configure_file(
"${PROJECT_SOURCE_DIR}/version.in.h"
"${PROJECT_BINARY_DIR}/version.h"
)
# Code
SET(smll_HEADERS
"${SMLLDir}/Common.hpp"
"${SMLLDir}/Config.hpp"
"${SMLLDir}/DetectionResults.hpp"
"${SMLLDir}/Face.hpp"
"${SMLLDir}/FaceDetector.hpp"
"${SMLLDir}/ImageWrapper.hpp"
"${SMLLDir}/landmarks.hpp"
"${SMLLDir}/MorphData.hpp"
"${SMLLDir}/OBSRenderer.hpp"
"${SMLLDir}/OBSTexture.hpp"
"${SMLLDir}/sarray.hpp"
"${SMLLDir}/TriangulationResult.hpp"
"${SMLLDir}/TestingPipe.hpp"
"${SMLLDir}/SingleValueKalman.hpp"
"${SMLLDir}/Kalman.hpp"
)
SET(gs_HEADERS
"${PROJECT_SOURCE_DIR}/gs/gs-effect.h"
"${PROJECT_SOURCE_DIR}/gs/gs-vertex.h"
"${PROJECT_SOURCE_DIR}/gs/gs-vertexbuffer.h"
"${PROJECT_SOURCE_DIR}/gs/gs-indexbuffer.h"
"${PROJECT_SOURCE_DIR}/gs/gs-rendertarget.h"
"${PROJECT_SOURCE_DIR}/gs/gs-texture.h"
)
SET(mask_HEADERS
"${PROJECT_SOURCE_DIR}/mask/mask.h"
"${PROJECT_SOURCE_DIR}/mask/mask-instance-data.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-animation.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-image.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-sequence.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-effect.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-light.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-material.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-mesh.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-model.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-morph.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-skinned-model.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-sound.h"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-emitter.h"
)
SET(facemask-plugin_HEADERS
"${PROJECT_SOURCE_DIR}/plugin/base64.h"
"${PROJECT_SOURCE_DIR}/plugin/exceptions.h"
"${PROJECT_SOURCE_DIR}/plugin/face-mask-filter.h"
"${PROJECT_SOURCE_DIR}/plugin/plugin.h"
"${PROJECT_SOURCE_DIR}/plugin/strings.h"
"${PROJECT_SOURCE_DIR}/plugin/utils.h"
"${PROJECT_BINARY_DIR}/version.h"
"${TINYOBJDir}/tiny_obj_loader.h"
"${gs_HEADERS}"
"${mask_HEADERS}"
"${smll_HEADERS}"
)
SET(smll_SOURCES
"${SMLLDir}/Config.cpp"
"${SMLLDir}/DetectionResults.cpp"
"${SMLLDir}/Face.cpp"
"${SMLLDir}/FaceDetector.cpp"
"${SMLLDir}/OBSRenderer.cpp"
"${SMLLDir}/ImageWrapper.cpp"
"${SMLLDir}/landmarks.cpp"
"${SMLLDir}/MorphData.cpp"
"${SMLLDir}/TriangulationResult.cpp"
"${SMLLDir}/TestingPipe.cpp"
"${SMLLDir}/SingleValueKalman.cpp"
)
SET(gs_SOURCES
"${PROJECT_SOURCE_DIR}/gs/gs-effect.cpp"
"${PROJECT_SOURCE_DIR}/gs/gs-indexbuffer.cpp"
"${PROJECT_SOURCE_DIR}/gs/gs-vertexbuffer.cpp"
"${PROJECT_SOURCE_DIR}/gs/gs-rendertarget.cpp"
"${PROJECT_SOURCE_DIR}/gs/gs-texture.cpp"
)
SET(mask_SOURCES
"${PROJECT_SOURCE_DIR}/mask/mask.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-animation.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-image.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-sequence.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-effect.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-light.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-material.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-mesh.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-model.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-morph.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-skinned-model.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-sound.cpp"
"${PROJECT_SOURCE_DIR}/mask/mask-resource-emitter.cpp"
)
SET(facemask-plugin_SOURCES
"${PROJECT_SOURCE_DIR}/plugin/base64.cpp"
"${PROJECT_SOURCE_DIR}/plugin/exceptions.cpp"
"${PROJECT_SOURCE_DIR}/plugin/face-mask-filter.cpp"
"${PROJECT_SOURCE_DIR}/plugin/plugin.cpp"
"${PROJECT_SOURCE_DIR}/plugin/utils.cpp"
"${TINYOBJDir}/tiny_obj_loader.cc"
"${gs_SOURCES}"
"${mask_SOURCES}"
"${smll_SOURCES}"
"${freetype_SOURCES}"
)
if(BUILD_UNIT_TESTS)
SET(facemask-plugin_TEST_SOURCES
"${PROJECT_SOURCE_DIR}/test/test.cpp"
"${PROJECT_SOURCE_DIR}/test/test-utils.cpp"
"${PROJECT_SOURCE_DIR}/test/test-image.cpp"
"${PROJECT_SOURCE_DIR}/test/test-base64.cpp"
"${PROJECT_SOURCE_DIR}/plugin/base64.cpp"
"${PROJECT_SOURCE_DIR}/plugin/exceptions.cpp"
"${PROJECT_SOURCE_DIR}/plugin/utils.cpp"
"${SMLLDir}/ImageWrapper.cpp"
)
endif()
SET(facemask-plugin_DATA
"${PROJECT_SOURCE_DIR}/data/effects/color_alpha_tex.effect"
"${PROJECT_SOURCE_DIR}/data/effects/color_conversion.effect"
"${PROJECT_SOURCE_DIR}/data/effects/default.effect"
"${PROJECT_SOURCE_DIR}/data/effects/denoise.effect"
"${PROJECT_SOURCE_DIR}/data/effects/merge.effect"
"${PROJECT_SOURCE_DIR}/data/effects/phong.effect"
"${PROJECT_SOURCE_DIR}/data/effects/aa.effect"
"${PROJECT_SOURCE_DIR}/data/locale/en-US.ini"
)
SET(facemask-plugin_LIBRARIES
${OpenCV_LIBS}
avrt.lib
Shlwapi.lib
)
INCLUDE_DIRECTORIES(
"${PROJECT_BINARY_DIR}"
"${PROJECT_SOURCE_DIR}"
)
source_group("Data Files" FILES ${facemask-plugin_DATA})
source_group("Plugin\\Headers" FILES ${facemask-plugin_HEADERS})
source_group("Plugin\\Sources" FILES ${facemask-plugin_SOURCES})
source_group("SMLL\\Headers" FILES ${smll_HEADERS})
source_group("SMLL\\Sources" FILES ${smll_SOURCES})
source_group("FreeType" FILES ${freetype_SOURCES})
source_group("GS\\Headers" FILES ${gs_HEADERS})
source_group("GS\\Sources" FILES ${gs_SOURCES})
source_group("Mask\\Headers" FILES ${mask_HEADERS})
source_group("Mask\\Sources" FILES ${mask_SOURCES})
# Compiler Configuration
add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Hide Microsofts insecurities
add_definitions(-DUNICODE -D_UNICODE) # Use Unicode Charset
add_definitions(-D_DISABLE_EXTENDED_ALIGNED_STORAGE) # To supress aligned storage error from Visual Studio 15.8
## All Warnings, Extra Warnings, Pedantic
if (MSVC)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
endif()
elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
endif()
################################################################################
# Building
################################################################################
add_library(facemask-plugin-objlib OBJECT
${facemask-plugin_HEADERS}
${facemask-plugin_SOURCES}
${facemask-plugin_DATA}
)
set_property(TARGET facemask-plugin-objlib PROPERTY POSITION_INDEPENDENT_CODE 1)
if (BUILD_FOR_PUBLIC)
ADD_LIBRARY(facemask_AVX MODULE
"${PROJECT_SOURCE_DIR}/smll/DetectionFunctions.cpp")
ADD_LIBRARY(facemask_NO_AVX MODULE
"${PROJECT_SOURCE_DIR}/smll/DetectionFunctions.cpp")
ADD_LIBRARY(facemask-plugin MODULE $<TARGET_OBJECTS:facemask-plugin-objlib>)
else()
add_library(facemask-plugin MODULE $<TARGET_OBJECTS:facemask-plugin-objlib>)
endif()
if (BUILD_FOR_PUBLIC)
TARGET_LINK_LIBRARIES(facemask_AVX
${facemask-plugin_LIBRARIES}
dlib::dlib
)
TARGET_LINK_LIBRARIES(facemask_NO_AVX
${facemask-plugin_LIBRARIES}
dlib::dlib_NO_AVX
)
TARGET_LINK_LIBRARIES(facemask-plugin ${LIBOBS_LIBRARIES}
${facemask-plugin_LIBRARIES}
dlib::dlib_NO_AVX
)
else()
TARGET_LINK_LIBRARIES(facemask-plugin
${LIBOBS_LIBRARIES}
${facemask-plugin_LIBRARIES}
dlib::dlib
)
endif()
if(BUILD_UNIT_TESTS)
add_executable(facemask-plugin-test
${facemask-plugin_TEST_SOURCES}
)
TARGET_LINK_LIBRARIES(facemask-plugin-test
${facemask-plugin_LIBRARIES} CppUTest
)
endif()
if(MSVC)
target_compile_definitions(facemask-plugin
PRIVATE _ENABLE_EXTENDED_ALIGNED_STORAGE
)
endif()
################################################################################
# Installation / Distribution
################################################################################
add_custom_command(TARGET facemask-plugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
"${PROJECT_SOURCE_DIR}/data"
"${DISTRIBUTE_PATH}/$<CONFIG>/data/obs-plugins/facemask-plugin"
)
add_custom_command(TARGET facemask-plugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${PROJECT_SOURCE_DIR}/data"
"${DISTRIBUTE_PATH}/$<CONFIG>/data/obs-plugins/facemask-plugin"
)
add_custom_command(TARGET facemask-plugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE:facemask-plugin>"
"${DISTRIBUTE_PATH}/$<CONFIG>/${DISTRIBUTE_PATH_BIN}/$<TARGET_FILE_NAME:facemask-plugin>"
)
add_custom_command(TARGET facemask-plugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE_DIR:facemask-plugin>/facemask-plugin.pdb"
"${DISTRIBUTE_PATH}/$<CONFIG>/${DISTRIBUTE_PATH_BIN}/facemask-plugin.pdb"
)
add_custom_command(TARGET facemask-plugin POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"${PROJECT_SOURCE_DIR}/package.json"
"${PROJECT_BINARY_DIR}/distribute/package.json"
)
if (BUILD_FOR_PUBLIC)
add_custom_command(TARGET facemask_AVX POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE:facemask_AVX>"
"${DISTRIBUTE_PATH}/$<CONFIG>/${DISTRIBUTE_PATH_BIN}/$<TARGET_FILE_NAME:facemask_AVX>"
)
add_custom_command(TARGET facemask_AVX POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE_DIR:facemask-plugin>/facemask_AVX.pdb"
"${DISTRIBUTE_PATH}/$<CONFIG>/${DISTRIBUTE_PATH_BIN}/facemask_AVX.pdb"
)
add_custom_command(TARGET facemask_NO_AVX POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE:facemask_NO_AVX>"
"${DISTRIBUTE_PATH}/$<CONFIG>/${DISTRIBUTE_PATH_BIN}/$<TARGET_FILE_NAME:facemask_NO_AVX>"
)
add_custom_command(TARGET facemask_NO_AVX POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
"$<TARGET_FILE_DIR:facemask-plugin>/facemask_NO_AVX.pdb"
"${DISTRIBUTE_PATH}/$<CONFIG>/${DISTRIBUTE_PATH_BIN}/facemask_NO_AVX.pdb"
)
endif()