Skip to content

Commit

Permalink
Fix generator subproject build
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle committed Sep 26, 2024
1 parent e3283a4 commit b077295
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Generator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ else()

message(STATUS "Building Generator as subproject...")
execute_process(
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_CURRENT_BINARY_DIR}/Build"
COMMAND_ERROR_IS_FATAL ANY)

# Now build InteropTests, which depends on SWIFTWINRT_EXE
set(SWIFTWINRT_EXE "${CMAKE_CURRENT_BINARY_DIR}/Sources/SwiftWinRT/SwiftWinRT.exe")
set(SWIFTWINRT_EXE "${CMAKE_CURRENT_BINARY_DIR}/Build/Sources/SwiftWinRT/SwiftWinRT.exe")
add_subdirectory(InteropTests)
endif()
5 changes: 4 additions & 1 deletion Support/Sources/WindowsRuntime/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
file(GLOB_RECURSE SOURCES *.swift)
add_library(WindowsRuntime STATIC ${SOURCES})
target_link_libraries(WindowsRuntime PUBLIC COM WindowsRuntime_ABI)
target_link_libraries(WindowsRuntime PRIVATE SWRT_InternalABI)
target_link_libraries(WindowsRuntime PRIVATE SWRT_InternalABI)

# Workaround for CMake not propagating include dirs
target_include_directories(WindowsRuntime INTERFACE "$<TARGET_FILE_DIR:ABIBindings>")

0 comments on commit b077295

Please sign in to comment.