Skip to content

Commit 65c0dff

Browse files
authored
build: account for FoundationNetworking (#46)
When building TSC with a development build of Foundation and using `-D Foundation_DIR=`, FoundationNetworking would not be found as it would not be in the library search path. Explicitly mark the dependency which also enables better tracking.
1 parent 52e6700 commit 65c0dff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/TSCUtility/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ add_library(TSCUtility
3636
)
3737
target_link_libraries(TSCUtility PUBLIC
3838
TSCBasic)
39+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
40+
target_link_libraries(TSCUtility PUBLIC
41+
FoundationNetworking)
42+
endif()
3943
# NOTE(compnerd) workaround for CMake not setting up include flags yet
4044
set_target_properties(TSCUtility PROPERTIES
4145
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})

0 commit comments

Comments
 (0)