-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathCMakeLists.txt
28 lines (27 loc) · 1.09 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
add_library(Checkpoints
Checkpointable.swift
CheckpointIndexReader.swift
CheckpointIndexWriter.swift
CheckpointReader.swift
CheckpointWriter.swift
Protobufs/tensor_bundle.pb.swift
Protobufs/tensor_shape.pb.swift
Protobufs/tensor_slice.pb.swift
Protobufs/types.pb.swift
Protobufs/versions.pb.swift
SnappyDecompression.swift)
set_target_properties(Checkpoints PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
target_compile_options(Checkpoints PRIVATE
$<$<BOOL:${BUILD_TESTING}>:-enable-testing>)
target_link_libraries(Checkpoints PUBLIC
ModelSupport)
install(TARGETS Checkpoints
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:Checkpoints,Swift_MODULE_DIRECTORY>/Checkpoints.swiftdoc
$<TARGET_PROPERTY:Checkpoints,Swift_MODULE_DIRECTORY>/Checkpoints.swiftmodule
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>/${swift_arch})