File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -62,9 +62,7 @@ function(add_swift_target target)
62
62
if (AST_SHARED OR BUILD_SHARED_LIBS )
63
63
set (AST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${target}.dir/${CMAKE_SHARED_LIBRARY_PREFIX}${target}${CMAKE_SHARED_LIBRARY_SUFFIX} )
64
64
else ()
65
- # NOTE(compnerd) this is a hack for the computation of the
66
- # basename/dirname below for the static path.
67
- set (AST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${target}.dir/${target} )
65
+ set (AST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${target}.dir/${CMAKE_STATIC_LIBRARY_PREFIX}${target}${CMAKE_STATIC_LIBRARY_SUFFIX} )
68
66
endif ()
69
67
else ()
70
68
set (AST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /${target}.dir/${target}${CMAKE_EXECUTABLE_SUFFIX} )
@@ -155,10 +153,13 @@ function(add_swift_target target)
155
153
add_library (${target} -static STATIC ${objs} )
156
154
add_dependencies (${target} -static ${AST_DEPENDS} )
157
155
get_filename_component (ast_output_bn ${AST_OUTPUT} NAME )
156
+ string (REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX} " "" ast_output_bn ${ast_output_bn} )
157
+ string (REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX} $" "" ast_output_bn ${ast_output_bn} )
158
158
get_filename_component (ast_output_dn ${AST_OUTPUT} DIRECTORY )
159
159
set_target_properties (${target} -static
160
160
PROPERTIES
161
161
LINKER_LANGUAGE C
162
+ ARCHIVE_OUTPUT_DIRECTORY ${ast_output_dn}
162
163
OUTPUT_DIRECTORY ${ast_output_dn}
163
164
OUTPUT_NAME ${ast_output_bn} )
164
165
add_custom_target (${target}
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ if(ENABLE_SWIFT)
120
120
-fblocks
121
121
-fmodule-map-file=${PROJECT_SOURCE_DIR}/dispatch/module.modulemap
122
122
DEPENDS
123
- ${PROJECT_SOURCE_DIR} /dispatch/ module.modulemap
123
+ module-maps
124
124
DispatchStubs
125
125
LINK_FLAGS
126
126
${use_ld_flag}
You can’t perform that action at this time.
0 commit comments