|
1 |
| -if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY) |
2 |
| - set(SOURCEKITD_REPL_DEPEND sourcekitdInProc) |
3 |
| -else() |
4 |
| - set(SOURCEKITD_REPL_DEPEND sourcekitd) |
5 |
| -endif() |
| 1 | +set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} edit) |
| 2 | +check_symbol_exists(el_wgets "histedit.h" HAVE_UNICODE_LIBEDIT) |
| 3 | + |
| 4 | +if(HAVE_UNICODE_LIBEDIT) |
| 5 | + if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY) |
| 6 | + set(SOURCEKITD_REPL_DEPEND sourcekitdInProc) |
| 7 | + else() |
| 8 | + set(SOURCEKITD_REPL_DEPEND sourcekitd) |
| 9 | + endif() |
6 | 10 |
|
7 |
| -add_sourcekit_executable(sourcekitd-repl |
8 |
| - sourcekitd-repl.cpp |
9 |
| - DEPENDS ${SOURCEKITD_REPL_DEPEND} edit |
10 |
| - COMPONENT_DEPENDS support |
11 |
| -) |
| 11 | + add_sourcekit_executable(sourcekitd-repl |
| 12 | + sourcekitd-repl.cpp |
| 13 | + DEPENDS ${SOURCEKITD_REPL_DEPEND} edit |
| 14 | + COMPONENT_DEPENDS support |
| 15 | + ) |
12 | 16 |
|
13 |
| -if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
14 |
| - set_target_properties(sourcekitd-repl |
15 |
| - PROPERTIES |
16 |
| - LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib") |
| 17 | + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
| 18 | + set_target_properties(sourcekitd-repl |
| 19 | + PROPERTIES |
| 20 | + LINK_FLAGS "-Wl,-rpath -Wl,@executable_path/../lib") |
17 | 21 |
|
18 |
| - if(SWIFT_ANALYZE_CODE_COVERAGE) |
19 |
| - set_property(TARGET sourcekitd-repl APPEND_STRING PROPERTY |
20 |
| - LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping") |
| 22 | + if(SWIFT_ANALYZE_CODE_COVERAGE) |
| 23 | + set_property(TARGET sourcekitd-repl APPEND_STRING PROPERTY |
| 24 | + LINK_FLAGS " -fprofile-instr-generate -fcoverage-mapping") |
| 25 | + endif() |
21 | 26 | endif()
|
22 |
| -endif() |
23 | 27 |
|
24 |
| -swift_install_in_component(tools |
25 |
| - TARGETS sourcekitd-repl |
26 |
| - RUNTIME DESTINATION bin) |
| 28 | + swift_install_in_component(tools |
| 29 | + TARGETS sourcekitd-repl |
| 30 | + RUNTIME DESTINATION bin) |
| 31 | +endif() |
0 commit comments