slint/examples/printerdemo/cpp/CMakeLists.txt
Simon Hausmann 7e08231650 C++: Enable /bigobj by default when building with MSVC
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.
2023-04-14 13:13:03 +02:00

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)