Skip to content

Commit 8f9838e

Browse files
authored
Merge pull request #141 from compnerd/staged
build: allow building with Foundation from the toolchain
2 parents 1256771 + 5ecca33 commit 8f9838e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Sources/TSCBasic/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ target_compile_options(TSCBasic PUBLIC
5757
target_link_libraries(TSCBasic PUBLIC
5858
TSCLibc)
5959
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
60-
target_link_libraries(TSCBasic PUBLIC
61-
Foundation)
60+
if(Foundation_FOUND)
61+
target_link_libraries(TSCBasic PUBLIC
62+
Foundation)
63+
endif()
6264
endif()
6365
target_link_libraries(TSCBasic PRIVATE
6466
$<$<PLATFORM_ID:Windows>:Pathcch>)

Sources/TSCUtility/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ target_link_libraries(TSCUtility PUBLIC
4848
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
4949
target_link_libraries(TSCUtility PRIVATE
5050
SQLite::SQLite3)
51-
target_link_libraries(TSCUtility PUBLIC
52-
FoundationNetworking)
51+
if(Foundation_FOUND)
52+
target_link_libraries(TSCUtility PUBLIC
53+
FoundationNetworking)
54+
endif()
5355
endif()
5456
# NOTE(compnerd) workaround for CMake not setting up include flags yet
5557
set_target_properties(TSCUtility PROPERTIES

0 commit comments

Comments
 (0)