CMake: Don't create symlinks with MinGW
On Windows, user might not have the correct permissions to create symlinks. Closes #19304
This commit is contained in:
@@ -71,9 +71,14 @@ function(wx_write_config_inplace)
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/wx-config-inplace.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/wx-config-inplace.in"
|
||||||
"inplace-${TOOLCHAIN_FULLNAME}"
|
"inplace-${TOOLCHAIN_FULLNAME}"
|
||||||
)
|
)
|
||||||
|
if(WIN32_MSVC_NAMING)
|
||||||
|
set(COPY_CMD copy)
|
||||||
|
else()
|
||||||
|
set(COPY_CMD create_symlink)
|
||||||
|
endif()
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND
|
COMMAND
|
||||||
${CMAKE_COMMAND} -E create_symlink
|
${CMAKE_COMMAND} -E ${COPY_CMD}
|
||||||
"lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}"
|
"lib/wx/config/inplace-${TOOLCHAIN_FULLNAME}"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/wx-config"
|
"${CMAKE_CURRENT_BINARY_DIR}/wx-config"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user