File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,12 @@ function(add_swift_target target)
153
153
add_library (${target} -static STATIC ${objs} )
154
154
add_dependencies (${target} -static ${AST_DEPENDS} )
155
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} )
156
+ if (NOT CMAKE_STATIC_LIBRARY_PREFIX STREQUAL "" )
157
+ string (REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX} " "" ast_output_bn ${ast_output_bn} )
158
+ endif ()
159
+ if (NOT CMAKE_STATIC_LIBRARY_SUFFIX STREQUAL "" )
160
+ string (REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX} $" "" ast_output_bn ${ast_output_bn} )
161
+ endif ()
158
162
get_filename_component (ast_output_dn ${AST_OUTPUT} DIRECTORY )
159
163
set_target_properties (${target} -static
160
164
PROPERTIES
You can’t perform that action at this time.
0 commit comments