mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-23 18:07:40 +00:00
fix: wxWidgets target path for clang-cl on Windows
wxWidgets chooses target files based on the compiler id, which makes clang-cl look under the clang_x64_lib layout. The dependencies are built with MSVC naming/layout, and clang-cl uses the MSVC frontend variant on Windows. Patch the generated wxWidgets config so clang-cl loads the vc_x64_lib targets instead.
This commit is contained in:
23
deps/wxWidgets/0001-Clang-CL-fix.patch
vendored
Normal file
23
deps/wxWidgets/0001-Clang-CL-fix.patch
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
build/cmake/wxWidgetsConfig.cmake.in | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/cmake/wxWidgetsConfig.cmake.in b/build/cmake/wxWidgetsConfig.cmake.in
|
||||
index 1a83f36..70ad8a4 100644
|
||||
--- a/build/cmake/wxWidgetsConfig.cmake.in
|
||||
+++ b/build/cmake/wxWidgetsConfig.cmake.in
|
||||
@@ -58,7 +58,11 @@ if(WIN32_MSVC_NAMING)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-include("${CMAKE_CURRENT_LIST_DIR}${wxPLATFORM_LIB_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
|
||||
+ include("${CMAKE_CURRENT_LIST_DIR}${wxPLATFORM_LIB_DIR}/vc_x64_lib/@PROJECT_NAME@Targets.cmake")
|
||||
+else()
|
||||
+ include("${CMAKE_CURRENT_LIST_DIR}${wxPLATFORM_LIB_DIR}/@PROJECT_NAME@Targets.cmake")
|
||||
+endif()
|
||||
|
||||
macro(wx_inherit_property source dest name)
|
||||
# property name without _<CONFIG>
|
||||
--
|
||||
2.43.0
|
||||
1
deps/wxWidgets/wxWidgets.cmake
vendored
1
deps/wxWidgets/wxWidgets.cmake
vendored
@@ -27,6 +27,7 @@ orcaslicer_add_cmake_project(
|
||||
GIT_TAG v3.3.2
|
||||
GIT_SHALLOW ON
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${JPEG_PKG}
|
||||
PATCH_COMMAND git apply --verbose --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/0001-Clang-CL-fix.patch
|
||||
CMAKE_ARGS
|
||||
-DwxBUILD_PRECOMP=ON
|
||||
${_wx_toolkit}
|
||||
|
||||
Reference in New Issue
Block a user