mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Better CMake Defaults (#10294)
* Auto generate CMAKE_PREFIX_PATH/DESTDIR * Auto set CMAKE_INSTALL_PREFIX * Always default SLIC3R_STATIC to on * Only allow one value for CMAKE_OSX_ARCHITECTURES * Set arch for OpenSSL from CMAKE_OSX_ARCHITECTURES * Set CMAKE_INSTALL_RPATH from CMAKE_PREFIX_PATH * Default CMAKE_MACOSX_RPATH and CMAKE_MACOSX_BUNDLE to on * Auto set BBL_RELEASE_TO_PUBLIC based on build config * Default to GTK 3 * Fix linux debug build Update find modules to also look for the debug variant of the libraries * Set DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO based on CMAKE_BUILD_TYPE * Add a fallback value for Windows SDK if the env variables are not set * Reflect CMake changes in the build scripts * Add missing line * Fix auto setting DEP_DEBUG and ORCA_INCLUDE_DEBUG_INFO * Update dep folder name for linux in GH actions * Invert dep-folder-name conditions `''` is considered a falsy value, which was causing the value to always be set to 'OrcaSlicer_dep' * Properly handle finding the debug version of libnoise * Convert FindNLopt.cmake to a config mode wrapper * Use separate build directory for debug builds on Linux * Move find_package for libnoise * Cleanup and improve linux build script - Add dry run - Add build in RelWithDebInfo - Add function to print and run commands * Remove linux destdir deprecation and cleanup * Fix flatpak build * Disable fail fast for flatpak builds * Flatpak improvements - Build wxWidgets using deps cmake - Improve handling of space freeing commands while building deps - Allow cmake to directly download deps - Set needed flags within cmake instead of the build manifest * Print clean build commands * Implement shellcheck recommendations * Cleanup * Fix CMakeLists.txt syntax by replacing empty elseif with else statement --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
23
deps/wxWidgets/wxWidgets.cmake
vendored
23
deps/wxWidgets/wxWidgets.cmake
vendored
@@ -1,5 +1,7 @@
|
||||
set(_wx_toolkit "")
|
||||
set(_wx_private_font "-DwxUSE_PRIVATE_FONTS=1")
|
||||
set(_wx_debug_postfix "")
|
||||
set(_wx_shared -DwxBUILD_SHARED=OFF)
|
||||
set(_wx_flatpak_patch "")
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(_gtk_ver 2)
|
||||
@@ -9,6 +11,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
endif ()
|
||||
|
||||
set(_wx_toolkit "-DwxBUILD_TOOLKIT=gtk${_gtk_ver}")
|
||||
if (FLATPAK)
|
||||
set(_wx_debug_postfix "d")
|
||||
set(_wx_shared -DwxBUILD_SHARED=ON -DBUILD_SHARED_LIBS:BOOL=ON)
|
||||
set(_wx_flatpak_patch PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/0001-flatpak.patch)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
@@ -17,34 +24,29 @@ else ()
|
||||
set(_wx_edge "-DwxUSE_WEBVIEW_EDGE=OFF")
|
||||
endif ()
|
||||
|
||||
# Note: The flatpak build builds wxwidgets separately due to CI size constraints.
|
||||
# ANY CHANGES MADE IN HERE MUST ALSO BE REFLECTED IN `scripts/flatpak/io.github.SoftFever.OrcaSlicer.yml`.
|
||||
# ** THIS INCLUDES BUILD ARGS. **
|
||||
# ...if you can find a way around this size limitation, be my guest.
|
||||
|
||||
orcaslicer_add_cmake_project(
|
||||
wxWidgets
|
||||
GIT_REPOSITORY "https://github.com/SoftFever/Orca-deps-wxWidgets"
|
||||
GIT_SHALLOW ON
|
||||
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} ${JPEG_PKG}
|
||||
${_wx_flatpak_patch}
|
||||
CMAKE_ARGS
|
||||
-DwxBUILD_PRECOMP=ON
|
||||
${_wx_toolkit}
|
||||
"-DCMAKE_DEBUG_POSTFIX:STRING="
|
||||
"-DCMAKE_DEBUG_POSTFIX:STRING=${_wx_debug_postfix}"
|
||||
-DwxBUILD_DEBUG_LEVEL=0
|
||||
-DwxBUILD_SAMPLES=OFF
|
||||
-DwxBUILD_SHARED=OFF
|
||||
${_wx_shared}
|
||||
-DwxUSE_MEDIACTRL=ON
|
||||
-DwxUSE_DETECT_SM=OFF
|
||||
-DwxUSE_UNICODE=ON
|
||||
${_wx_private_font}
|
||||
-DwxUSE_PRIVATE_FONTS=ON
|
||||
-DwxUSE_OPENGL=ON
|
||||
-DwxUSE_WEBREQUEST=ON
|
||||
-DwxUSE_WEBVIEW=ON
|
||||
${_wx_edge}
|
||||
-DwxUSE_WEBVIEW_IE=OFF
|
||||
-DwxUSE_REGEX=builtin
|
||||
-DwxUSE_LIBXPM=builtin
|
||||
-DwxUSE_LIBSDL=OFF
|
||||
-DwxUSE_XTEST=OFF
|
||||
-DwxUSE_STC=OFF
|
||||
@@ -53,7 +55,6 @@ orcaslicer_add_cmake_project(
|
||||
-DwxUSE_ZLIB=sys
|
||||
-DwxUSE_LIBJPEG=sys
|
||||
-DwxUSE_LIBTIFF=OFF
|
||||
-DwxUSE_NANOSVG=OFF
|
||||
-DwxUSE_EXPAT=sys
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user