-
Notifications
You must be signed in to change notification settings - Fork 149
/
CMakeLists.txt
30 lines (28 loc) · 1.08 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
add_library(ImageClassificationModels
BigTransfer.swift
DenseNet121.swift
EfficientNet.swift
LeNet-5.swift
MobileNetV1.swift
MobileNetV2.swift
MobileNetV3.swift
ResNet.swift
ResNetV2.swift
ShuffleNetV2.swift
SqueezeNet.swift
VGG.swift
WideResNet.swift
Xception.swift)
set_target_properties(ImageClassificationModels PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_compile_options(ImageClassificationModels PRIVATE
$<$<BOOL:${BUILD_TESTING}>:-enable-testing>)
install(TARGETS ImageClassificationModels
ARCHIVE DESTINATION lib/swift/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
LIBRARY DESTINATION lib/swift/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
RUNTIME DESTINATION bin)
get_swift_host_arch(swift_arch)
install(FILES
$<TARGET_PROPERTY:ImageClassificationModels,Swift_MODULE_DIRECTORY>/ImageClassificationModels.swiftdoc
$<TARGET_PROPERTY:ImageClassificationModels,Swift_MODULE_DIRECTORY>/ImageClassificationModels.swiftmodule
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>/${swift_arch})