File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 4
4
5
5
function (install_symlink name target outdir )
6
6
set (DESTDIR $ENV{DESTDIR} )
7
- if (CMAKE_HOST_UNIX )
8
- set (LINK_OR_COPY create_symlink )
9
- else ()
10
- set (LINK_OR_COPY copy )
11
- endif ()
12
-
13
7
set (bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX} /${outdir} /" )
14
8
15
9
message (STATUS "Creating ${name} " )
16
10
17
11
execute_process (
18
- COMMAND "${CMAKE_COMMAND} " -E ${LINK_OR_COPY} "${target} " "${name} "
19
- WORKING_DIRECTORY "${bindir} " )
12
+ COMMAND "${CMAKE_COMMAND} " -E create_symlink "${target} " "${name} "
13
+ WORKING_DIRECTORY "${bindir} " ERROR_VARIABLE has_err )
14
+ if (CMAKE_HOST_WIN32 AND has_err )
15
+ execute_process (
16
+ COMMAND "${CMAKE_COMMAND} " -E copy "${target} " "${name} "
17
+ WORKING_DIRECTORY "${bindir} " )
18
+ endif ()
20
19
21
20
endfunction ()
You can’t perform that action at this time.
0 commit comments