Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake and Build System Overhaul #5045

Open
wants to merge 105 commits into
base: main
Choose a base branch
from

Conversation

Ocraftyone
Copy link
Contributor

@Ocraftyone Ocraftyone commented Apr 16, 2024

Add the ability to build deps from main CMake file

During the configuration of the main project CMake file, you can specify BUILD_DEPS to have the deps built. After they are built, the current state of the deps folder is saved and building is skipped until the folder is updated or the option FORCE_DEPS is specified. CLEAN_DEPS is also available to remove the deps folder and recompile.

CMake presets

CMake presets include all of the options needed for each OS and build type. This allows the user to select a preset to use and get up and running quicker without having to manually set each option. This is most useful for IDEs that support presets (VS, VSCode with CMake Tools extension, CLion).

Other Changes

  • Update the main CMake build file to be more readable (Add compiler flags and LINUX flag plus general organization and pruning)

  • Automatic generation of CMAKE_PREFIX_PATH (and CMAKE_INSTALL_RPATH on macOS)

  • Change Linux DESTDIR and CMAKE_PREFIX_PATH to OrcaSlicer_dep to follow other platforms

  • Automatic BBL_RELEASE_TO_PUBLIC (On when build type is Release, Off on others)

  • Stop using BBL_INTERNAL_TESTING in BuildLinux.sh. Most of its functionality is disabled anyway.

  • Default to GTK3 on linux

  • Fix deps debug build on linux so they only need to be compiled once

  • Hide compiler commands during OpenSSL, MPFR and GMP builds

  • Re-enable patch test for wxWidgets

  • Suppress CMake depreciation warnings

  • Update devcontainer.json

  • Update linux build script

  • Update Windows build script

  • Update macOS build scrip

Similar flags to the existing MSVC flag
SLIC3R_GTK default is now 3

No GTK2 CMake presets
Add name for NLopt debug library

If building in debug on linux, build Qhull in RelWithDebInfo (debug errors out and says it can't find qhullcpp)
Only builds dependencies if there is a change in committed or uncommited files within the deps folder (excluding build files)
@Ocraftyone
Copy link
Contributor Author

Ocraftyone commented Sep 20, 2024

Major updates since last time:

  • Hide the installing text for deps
  • Improve Win10SDK path generation
  • Revert changes to the linux buildscript pertaining to using CMake Presets
  • Add new options to linux buildscript: packing deps, building in RelWithDebInfo
  • Merge the windows buildscripts (Both files are still there, but the 2019 version just calls the 2022 with an extra flag and passes the rest of the parameters through)
  • Update how the arguments are processed in the windows buildscript
  • Add "killbuild" option to windows buildscript
  • Update how cmake commands are echoed then called in the windows buildscript
  • Update the macOS buildscript: check the provided build config type, use different build dirs based on build type, use relative paths, fix single thread build flag, update the if statements
  • Remove now unneeded cmake arguments across all build scripts

@Ocraftyone
Copy link
Contributor Author

@SoftFever I think its ready 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for response waiting for response from PR creator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants