Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit c7f28db

Browse files
committed
Update CMake config
1 parent adaaf94 commit c7f28db

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

Examples/LeNet-MNIST/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ add_executable(LeNet-MNIST
22
main.swift)
33
target_link_libraries(LeNet-MNIST PRIVATE
44
ImageClassificationModels
5+
LayerInit
56
Datasets)
67

78

Models/LayerInit/CMakeLists.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
add_library(LayerInit
2+
AutoConv.swift
3+
AutoDense.swift
4+
AutoFlatten.swift
5+
AutoLayer.swift
6+
AutoPool.swift
7+
AutoSequenced.swift)
8+
set_target_properties(LayerInit PROPERTIES
9+
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
10+
target_compile_options(LayerInit PRIVATE
11+
$<$<BOOL:${BUILD_TESTING}>:-enable-testing>)
12+
13+
14+
install(TARGETS LayerInit
15+
ARCHIVE DESTINATION lib/swift/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
16+
LIBRARY DESTINATION lib/swift/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>
17+
RUNTIME DESTINATION bin)
18+
get_swift_host_arch(swift_arch)
19+
install(FILES
20+
$<TARGET_PROPERTY:LayerInit,Swift_MODULE_DIRECTORY>/LayerInit.swiftdoc
21+
$<TARGET_PROPERTY:LayerInit,Swift_MODULE_DIRECTORY>/LayerInit.swiftmodule
22+
DESTINATION lib/swift$<$<NOT:$<BOOL:${BUILD_SHARED_LIBS}>>:_static>/$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>/${swift_arch})

0 commit comments

Comments
 (0)