Skip to content

Commit e6ce2ff

Browse files
author
Chris Bieneman
committed
[CMake] Fixing up CMark exports to expand at configuration
Expanding this at include time doesn't work correctly for LLDB because the variable conventions aren't consistent. Expanding and configure time means the Swift variables get expanded and passed along.
1 parent e8645f3 commit e6ce2ff

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmake/modules/SwiftConfig.cmake.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ set(SWIFT_LIBRARY_DIR "@SWIFT_CONFIG_LIBRARY_DIRS@")
1717
set(SWIFT_CMAKE_DIR "@SWIFT_CMAKE_DIR@")
1818
set(SWIFT_BINARY_DIR "@SWIFT_BINARY_DIR@")
1919

20-
if(NOT TARGET libcmark_static AND ${product}_PATH_TO_CMARK_BUILD)
21-
include(${${product}_PATH_TO_CMARK_BUILD}/src/CMarkExports.cmake)
20+
set(CMARK_TARGETS_FILE @SWIFT_PATH_TO_CMARK_BUILD@/src/CMarkExports.cmake)
21+
if(NOT TARGET libcmark_static AND EXISTS ${CMARK_TARGETS_FILE})
22+
include(${CMARK_TARGETS_FILE})
2223
endif()
2324

2425
if(NOT TARGET swift)

0 commit comments

Comments
 (0)