Commit graph

73 commits

Author SHA1 Message Date
ogoffart
3278b39549 Bump version number to 0.1.6 2021-11-24 14:19:09 +00:00
Simon Hausmann
78753cd3aa Include the architecture in the file name for non-Windows
On windows that's already included, but on Linux it should also be
there.
2021-11-24 13:45:52 +01:00
Simon Hausmann
a244e16829 Add visiblity to the C++ binary packages
* Rename the package to `SixtyFPS-cpp-*` to make it easier to see that these are for C++
* Refer to the download and extraction process in the two C++ "READMEs"
* Set the home page url in the cmake project() command, from where cpack will pick it up for inclusion in the installer.

cc #631
2021-11-24 12:53:43 +01:00
Simon Hausmann
3550362f0b Fix blurry test in the NSIS installer for the C++ package on Windows
Enable High-DPI as per https://gitlab.kitware.com/cmake/cmake/-/issues/17724
2021-11-23 10:18:50 +01:00
Simon Hausmann
cd9db61545 Include the VS runtime dlls in the binary package
We bundle Qt and Qt needs the VC runtime DLLs. There are two options:
Find and locate vcredist.exe, include it in the NSIS installer and run
it. Alternatively, a cmake module exists to locates the DLLs and
install them.

This patch uses the latter option, for simplicity. When upstream ticket
https://gitlab.kitware.com/cmake/cmake/-/issues/17725 is implemented, we
could switch to the first option.

Note: This might include a few DLLs that Qt probably doesn't
need.
2021-11-22 16:04:09 +01:00
Olivier Goffart
921f5675d6 Put the licenses in the C++ binary package
Note that this also change the path names to "licenses" in the viewer package
2021-11-18 19:20:25 +01:00
Simon Hausmann
7f61d99734 Fix C++ examples not launching out of the box on Windows when using multi-config generator
We copy the sixtyfps_cpp.dll into the bin directory where the examples
are, but that needs to be a Debug/ or Release/ sub-directory in case of
a multi-config generator.
2021-11-18 11:40:45 +01:00
Olivier Goffart
7c34e7f27f C++ packages: Move the Qt plugins in the right directory 2021-11-18 10:23:06 +01:00
Olivier Goffart
6cfb18b5d7 Fix warnings in the tests in release
The maybe-uninitialized warning triggers while we know from what
we are testing that it is meant to be initialized
2021-11-18 10:23:06 +01:00
Olivier Goffart
304ca3b62f C++ package: Bundle the Qt binary in the binary package 2021-11-18 10:23:06 +01:00
Olivier Goffart
44118556c3 cpack: Only generate one package (the tar.gz one) 2021-11-18 10:23:06 +01:00
Olivier Goffart
7bf3fd2871 Fix invalid CMake package on windows because of missing IMPORTED_IMPLIB 2021-11-16 17:06:27 +01:00
Olivier Goffart
8a3b064b58 cmake: have the style as a cmake cache variable 2021-11-16 17:06:15 +01:00
Simon Hausmann
6346a55fdd Check the Rust version when using corrosion
Let cmake perform the version check. FindRust.cmake already uses VERSION_VAR
and therefore is versioned.

cc #622
2021-11-05 13:07:36 +01:00
ogoffart
b25ae6fbcd Bump version number to 0.1.5 2021-10-26 07:36:54 +00:00
ogoffart
77fcd5221b Bump version number to 0.1.4 2021-10-07 09:36:43 +00:00
ogoffart
8b9717633e Bump version number to 0.1.3 2021-10-05 10:31:45 +00:00
Simon Hausmann
7a2f365941 Bump corrosion sha1
This includes improved cargo version parsing and better error messages when rustc isn't found.
2021-09-30 15:03:40 +02:00
Simon Hausmann
45aa93f1b1 Make it possible to use the C++ build with Qt 6
Since we require Qt 5.15, we can use the versionless CMake targets and also
find Qt 6 first.
2021-09-20 17:02:35 +02:00
Simon Hausmann
4f158618a1 Fix make install in the C++ build running cbindgen
Make install would still trigger the generated_headers_target CMake
custom command - due to the use of add_dependencies - and that would end
up running cbindgen. That in turn breaks "make install" when it's run in
an environment that doesn't have cargo in PATH (for example when using
"sudo make install").

This patch folds the generation of the C++ header files into the build
of the sixtyfps-cpp crate - via build.rs. By default the headers are
placed in api/sixtyfps-cpp/generated_include but the CMake build
redirects that into the build directory.

Note: Due to the way that corrosion works, cargo is still run when
running "make install", but it's path is absolute and there should not
be any reliance on the PATH environment variable.
2021-09-18 07:32:53 +02:00
Simon Hausmann
562842f19e Bump minimum required CMake version from 3.16 to 3.19
The upcoming re-organization of the C++ header generation requires the
use of the CORROSION_ENVIRONMENT_VARIABLES target property, which in
turn requires CMake >= 3.19.
2021-09-18 07:32:53 +02:00
Simon Hausmann
0e191caf78 Improve cmake diagnostics
Print a feature summary. This also helps diagnose CI builds.
2021-09-16 10:41:33 +02:00
Simon Hausmann
1fd8c7236a Make it possible to disable the GL backend in the CMake build
Even if SIXTYFPS_BACKEND_GL is set to OFF, we would default to enabling
X11, which translates to enabling the x11 feature, which in turn
implicitly activates the GL backend. In addition, the interpreter Rust
API crate also enables the GL backend in its defeaults.

In order to make it possible to turn off the GL backend, three changes are necessary:

* The default backend no more selects a default :-). Instead the Rust
  API crate, Rust interpreter API crate and the CMake project define
  the same features and defaults.
* The C++ crate depends on the interpreter without its defaults (which enable GL)
* In CMake the X11 and Wayland features become dependent options, that
  are only show in the CMake configure UI if the GL backend is enabled.
  This way a GL-disabled build won't also pass --features x11.
2021-09-08 17:13:10 +02:00
ogoffart
e54e03148f Bump version number to 0.1.2 2021-09-04 10:08:51 +02:00
Simon Hausmann
cca2a18edb Fix C++ build with the interpreter disabled 2021-09-03 14:33:55 +02:00
Simon Hausmann
5a81976f3b Allow selecting features in the CMake integration
Provide the same features as in the Rust API crate, as CMake
options.
2021-09-03 14:33:55 +02:00
ogoffart
53f286258c Bump version number to 0.1.1 2021-08-10 08:06:20 +00:00
Olivier Goffart
74c00b1cec Add a github action to bump version numbers 2021-08-10 09:03:29 +02:00
Simon Hausmann
9784415a7e Fix invalid CMake package config files when using different build types
As we try to copy the different location target properties from the
corrosion target into the package config file, we need to take all the
usual build types into account, not only Debug/Release.

Especially RelWithDebInfo is popular among packagers.
2021-07-06 23:07:35 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Olivier Goffart
ccdcb61178 Rename the sixtyfps_compiler binary to sixtyfps-compiler 2021-06-29 14:21:44 +02:00
Simon Hausmann
be95545474 Bump corrosion
This new version includes fixes to avoid unnecessary rebuilds.
2021-06-29 10:37:02 +02:00
Olivier Goffart
98cec35080 Increase version numbers 2021-06-28 10:39:43 +02:00
Simon Hausmann
5fa7b31f01 Fix cross-compiling with CMake
Select that the compiler and xtask should be compiled as host binaries,
not target.

This also pulls in new corrosion with better cross-compilation support.
2021-06-23 20:22:29 +02:00
Simon Hausmann
5d24fde6f5 Make it easier to run the examples on Windows in the C++ build
Place the examples into the bin folder in the top-level directory (when
not built standalone), along with the sixtyfps dll.
2021-06-01 10:05:00 +02:00
Olivier Goffart
0df8161a6b Also require Qt 5.15 in the main CMakeLists 2021-05-21 08:01:30 +02:00
Simon Hausmann
5f6ed2488e Avoid link error when cargo found Qt but CMake didn't
When using cmake to configure the C++ build and Qt is found, and then
build with `SIXTYFPS_NO_QT=0 cmake --build ..`, the C++ library is built
without Qt support but qt_viewer is built. Linkage then fails when it
tries to access the API in libsixtyfps_cpp.so that provides the QWidget,
as that symbol is not present.

So with newer CMake we use find_package to provide positive information
to the cargo build about where Qt is, and consequently this patch
provides negative information to disable Qt support if CMake could not
find Qt -- or it was deliberately disabled for example using
`-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=1`.

cc #232
2021-05-20 20:33:07 +02:00
Olivier Goffart
aabd320e83 C++ Api to run a functor from a thread 2021-05-11 16:42:59 +02:00
Simon Hausmann
b30aaf2c06 Fix Qt detection in C++ build when qmake is not in PATH but CMAKE_PREFIX_PATH is set
find_package(Qt5) may do a better job at finding qmake, especially if the build is invoked
through Qt Creator, which may make sure that CMAKE_PREFIX_PATH is set.

Forward the qmake path therefore the the rust build.
2021-05-11 10:55:15 +02:00
Olivier Goffart
3380383787 Bump version number
(Does not include docs and README yet)
2021-04-26 13:16:48 +02:00
Olivier Goffart
a904a9f507 Update the corrosion tag 2021-04-23 17:37:37 +02:00
Simon Hausmann
3f6bbaf53a Make it possible to use the C++ headers without CMake
Detect the pointer size solely via the pre-processor
2021-03-31 08:42:54 +02:00
Simon Hausmann
7a708525d9 Fix usage of installed C++ headers
Include two new internal header files in the install set
2021-03-31 08:42:54 +02:00
Olivier Goffart
8ef0b3481c Don't make CI fails for warnings on windows 2021-03-30 19:25:00 +02:00
Olivier Goffart
a0cc8a2976 Have C++ warning in test break the CI 2021-03-30 18:06:24 +02:00
Simon Hausmann
272a87ccf1 Fix C++ build
Map the target_pointer_width cfg's used for the opaque ffi interpreter
data structures to #ifdefs in CMake, to avoid that cbindgen generates
them multiple times without guard.
2021-03-25 09:37:34 +01:00
Olivier Goffart
d79131f18f Split the tests into two files for the interpreter and others 2021-03-22 11:24:11 +01:00
Simon Hausmann
9eecdefb35 Add ComponentCompiler::build_from_path 2021-03-19 17:26:19 +01:00
Simon Hausmann
f5fb0bf297 Prospective Qt linkage fix for macOS
Try adding an LC_RPATH command to the cdylib that we're building (for example libsixtyfps_cpp.dylib),
to fix linkage against Qt, which uses `@rpath/QtCore.framework/XXX` for inter-library linkage dependencies.
2021-03-17 14:02:33 +01:00
Simon Hausmann
a06f0b22fa Add a debug message to see what's set in the CI 2021-03-17 11:57:19 +01:00