Skip to content

Commit 5ecca33

Browse files
committed
build: allow building with Foundation from the toolchain
This is meant to be used to build the Windows toolchain which uses a staged build where Foundation is not built and used from the build root.
1 parent cf363a3 commit 5ecca33

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)