forked from altstoreio/AltKit
-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
38 lines (28 loc) · 1.42 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
cmake_minimum_required(VERSION 3.15.1)
project(SideKit LANGUAGES Swift)
add_library(SideKit
Sources/SideKit/Extensions/ALTServerError+Conveniences.swift
Sources/SideKit/Extensions/Result+Conveniences.swift
Sources/SideKit/Errors/ALTServerError.swift
Sources/SideKit/Errors/ALTServerError+NSError.swift
Sources/SideKit/Errors/ALTServerConnectionError.swift
Sources/SideKit/Errors/ALTServerConnectionError+NSError.swift
Sources/SideKit/Server/Connection.swift
Sources/SideKit/Server/NetworkConnection.swift
Sources/SideKit/Server/Server.swift
Sources/SideKit/Server/ServerConnection.swift
Sources/SideKit/Server/ServerManager.swift
Sources/SideKit/Server/ServerProtocol.swift
Sources/SideKit/Types/CodableServerError.swift
)
target_link_libraries(SideKit PRIVATE CSideKit)
set_property(TARGET SideKit PROPERTY XCODE_ATTRIBUTE_SWIFT_VERSION "5.0")
# Make CSideKit's modulemap available to SideKit
set_property(TARGET SideKit PROPERTY XCODE_ATTRIBUTE_SWIFT_INCLUDE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/Sources/CSideKit")
# Add binary dir to interface include path to make Swift header accessible to targets using SideKit
target_include_directories(SideKit INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
# Copy generated Swift header to binary dir
add_custom_command(TARGET SideKit
POST_BUILD
COMMAND cp $DERIVED_SOURCES_DIR/SideKit-Swift.h ${CMAKE_CURRENT_BINARY_DIR}
)