mirror of
https://github.com/slint-ui/slint.git
synced 2025-12-23 09:19:32 +00:00
Large C++ files generated from .slint files can cause link problems with MSVC. When that happens, MSVC itself suggests /bigobj as remedy. It's not apparent that there's a downside to using this option, apart from backwaords binary compatibility - which is not a concern for us. The discussion at https://developercommunity.visualstudio.com/t/Enable-bigobj-by-default/1031214 suggests that perhaps this will become the default one day. To simplify our examples and avoid users running into this, let's enable it by default.
13 lines
427 B
CMake
13 lines
427 B
CMake
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
|
|
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
|
|
|
|
cmake_minimum_required(VERSION 3.21)
|
|
project(slint_cpp_printer_demo LANGUAGES CXX)
|
|
|
|
if (NOT TARGET Slint::Slint)
|
|
find_package(Slint REQUIRED)
|
|
endif()
|
|
|
|
add_executable(printerdemo main.cpp)
|
|
target_link_libraries(printerdemo PRIVATE Slint::Slint)
|
|
slint_target_sources(printerdemo ../ui/printerdemo.slint)
|