Commit graph

25 commits

Author SHA1 Message Date
Simon Hausmann
4cb6d12119 Initial support for Windows ARM64 binaries
Python is missing, otherwise this builds windows arm64 binaries for the
tools, C++ packages, slint-compiler, npm binaries, and lsp binaries for
the VS code extension.
2025-06-17 09:59:50 +02:00
Simon Hausmann
b0db6d78fd Prospective fix for downloadling slint-compiler for Slint releases
The GitHub release name has the git tag name, so a v prefix.
2024-09-23 17:23:02 +02:00
Simon Hausmann
069b157143 Unify Slint project version in CMake build 2024-08-29 11:23:09 +02:00
Simon Hausmann
90b2058e49 Make it possible to configure a CMake build with the slint-compiler to be downloaded at app configure time 2024-08-29 11:23:09 +02:00
Simon Hausmann
35de15ce4b Remove stray CMake cache variable setting
The same line exists unconditionally further down in the same file.
2024-08-28 11:16:55 +02:00
Simon Hausmann
5d03d6e1bd Simplify slint-compiler import location logic in SlintConfig.cmake.in
Instead of detecting the suffix, just copy across the corrosion-determined file name.

Amends 13975d9def
2024-08-25 21:05:55 +02:00
Simon Hausmann
13975d9def Fix locating the slint-compiler.exe on cmake cross-compiled packages
When cross-compiling CMAKE_EXECUTABLE_SUFFIX may not be set to .exe even
though the host is Windows, because this variable always refers to the
target. This is a missing feature in cmake, so work around it for now.
See also https://gitlab.kitware.com/cmake/cmake/-/issues/17553 I made a
similar workaround in Corrosion long time ago with commit
b8a6b26a0f2d526e0492df9fd88c0495b0b8a64f

The target prop line is duplicated in favor of introducing a variable,
that would otherwise be at risk of being visible in the user scope.
2024-08-23 18:10:11 +02:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Simon Hausmann
231dbd5695 Revert "Revert "Improve file type for SLINT_COMPILER cmake cache variable""
This reverts commit 292f487815.

Olivier had the brilliant idea of preceeding the path with a slash
on the Yocto side, so we can go back to the correct "type".
2023-10-06 14:56:28 +02:00
Simon Hausmann
292f487815 Revert "Improve file type for SLINT_COMPILER cmake cache variable"
This reverts commit 0773e51d92.

By the SLINT_COMPILER being a `FILEPATH`, cmake will convert any
relative path to an absolute path. That's not wanted for the Yocto
build, because there we pass
'$ENV{OECORE_NATIVE_SYSROOT}/usr/bin/slint-compiler', so that
the path is resolved dynamically against the environment variable that
the Yocto SDK sets.

CMake would convert this to an absolute path that points into the build
directory, i.e. it would be /home/blah/foo/\$ENV{...}
2023-10-06 13:05:30 +02:00
Simon Hausmann
0773e51d92 Improve file type for SLINT_COMPILER cmake cache variable
Use a FILEPATH to reflect that this is a path to a file and then the cmake configurator will
show a file dialog.
2023-10-02 13:15:20 +02:00
Olivier Goffart
14f7fe4ba2
cmake: add flags to only build the compiler
... and to use an external compiler

For example, this is how one only build the compiler:

```
cmake .. -DSLINT_BUILD_RUNTIME=OFF -DCMAKE_INSTALL_PREFIX=/tmp/slint_compiler
make install
```

And this only build the runtime
```
cmake .. -DSLINT_FEATURE_COMPILER=OFF -DCMAKE_INSTALL_PREFIX=/tmp/install_runtime
make install
```

And then this can be used in a project like so:
```
cmake .. -DCMAKE_PREFIX_PATH=/tmp/install_runtime/ -DSLINT_COMPILER=/tmp/install_compiler/bin/slint-compiler
```
2023-09-15 14:42:52 +02:00
Simon Hausmann
e9286c1189 Make it possible to build the slint-cpp crate as a static library
This isn't supported on desktop yet, but on MCU it is.

Cargo is instructed to build a dylib and a staticlib, but corrosion
instructs rustc to build only either dylib or staticlib.

Corrosion listens to the BUILD_SHARED_LIBS option and will change the
default for the Slint::Slint INTERFACE_LINK_LIBRARIES to either
slint-cpp-shared or slint-cpp-static. This way the selection is
transparent to the users.
2023-07-21 18:32:45 +02:00
Aurindam Jana
5a4a7fee63
Update royalty free license to 1.1 (#2994) 2023-07-10 10:12:11 +02:00
Olivier Goffart
11dea135f7 Domain: slint-ui.com -> slint.dev 2023-06-16 10:55:08 +02:00
Tobias Hunger
04d1229685 Fix licnese information using xtask 2023-06-16 09:14:20 +02:00
Jonathan Schwender
4ade9faa0d Update Corrosion to v0.3
This requires the following changes:
- Delay configuring SlintConfig.cmake:
  Corrosion sets the `IMPORTED` locations late to allow us to set
  OUTPUT_DIRECTORY target properties. The configuration of
  SlintConfig.cmake must be deferred until after Corrosion set the
  locations. Since we are writing to a config file Generator expressions
  are not an option.
- Remove BUILD_TYPE mapping from SlintConfig.cmake:
  As discussed in https://github.com/slint-ui/slint/pull/1785#issuecomment-1294630845
  remove the mapping of the build types since corrosion now always sets
  the `IMPORTED_LOCATION` property.

User facing improvements enabled by the update:
- Corrosion will not fail anymore if the user has a Rust toolchain >=1.60
  installed, but the default toolchain is < 1.60.
- Corrosion will respect OUTPUT_DIRECTORY properties and move target
  artifacts to the expected locations
2022-11-02 21:38:39 +01:00
Olivier Goffart
29d28dc73e C++: don't force the SLINT_STYLE cmake variable
Keep the default if unset, otherwise use whatever SLINT_STYLE was passed
2022-07-20 12:18:18 +02:00
Simon Hausmann
df2d6442d4 Make it possible to disable the slint compiler from the CMake build
This isn't always needed, for example when using only the interpreter API,
and its dependency to native libraries on Linux (namely fontconfig) makes it difficult to cross-compile with
CMake.

While cargo is invoked correctly for the native binary build, the library search paths
coming from CMake will be target specific, not host specific.

So for now this provides a way of disabling the compiler.
2022-03-22 12:59:52 +01:00
Tobias Hunger
526166090e cmake: Do not break when slint is build with empty CMAKE_BUILD_TYPE
Do not break building against slint using CMake from C++ when no
CMAKE_BUILD_TYPE was set when building Slint.

This just makes sure the build type is properly quoted, which makes sure
we keep a (empty) string token where CMake expects one.

Fixes: #1065
2022-03-17 18:18:20 +01:00
Tobias Hunger
ebe3a3c37c cpp: Fix cmake property mapping
Fix the mapping between a projects CMAKE_BUILD_TYPE and the build type
of the imported Slint library.

Fixes #1027
2022-03-09 19:53:06 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Simon Hausmann
b1a70f9e58 Rename the SixtyFPS CMake interface 2022-02-02 09:58:26 +01:00
Renamed from api/cpp/cmake/SixtyFPSConfig.cmake.in (Browse further)