Skip to content

Commit 2429960

Browse files
compnerdaciidgh
authored andcommitted
Commands: be more explicit about dependencies
On Swift-Foundation targets, FoundationXML is required. When building against a custom Foundation and a SDK which does not have Foundation, FoundationXML will not be tracked properly without the explicit linkage.
1 parent 1645867 commit 2429960

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/Commands/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ target_link_libraries(Commands PUBLIC
3232
Workspace
3333
XCBuildSupport
3434
Xcodeproj)
35+
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
36+
target_link_libraries(Commands PUBLIC
37+
FoundationXML)
38+
endif()
3539
# NOTE(compnerd) workaround for CMake not setting up include flags yet
3640
set_target_properties(Commands PROPERTIES
3741
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})

0 commit comments

Comments
 (0)