Commit graph

15 commits

Author SHA1 Message Date
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
4eb50335a4 Prospective build fix for the CI
Make sure to prepare the cmake module and extend the lookup in the
project to prefer the local build.
2020-06-04 16:55:27 +02:00
Simon Hausmann
2e0a5ddb25 Create & install a cmake package file (part 3)
The cargo target directory tree is now populated with a cmake package
file and that's also installed into the prefix specified with the cargo
cmake xtask.

As a consequence, the cpptest example can be built by first building the
cmake package:

    cargo xtask cmake

    or

    cargo xtask cmake --release --target some-triplet)

    or

    cargo xtask cmake --release --prefix /somewhere --install

and then run cmake in the cpptest example with a prefix path:

    -DCMAKE_PREFIX_PATH=/where/you/installed/it or simply
    -DCMAKE_PREFIX_PATH=../../target/debug for example.

Pending still is the sixtyfps compiler tool installation and discovery.
2020-06-04 15:33:18 +02:00
Simon Hausmann
c5001703d4 Build the cmake module for our runtime as xtask, part 2
This is done by calling cargo with json output to build the libraries,
collect the .a files, extract the native libraries needed for final
linkage and pass all that to a CMake project that cobbles together the
.a files into a propery cmake target with include paths, etc.
2020-06-04 15:29:19 +02:00
Simon Hausmann
33cfe03dc9 Rework the C++ facing build system, part 1
The objective is to automatically create a propery cmake module, with a
FindSixtyFPSConfig.cmake, corresponding targets .cmake files, etc. This
should encapsulate the build profile (debug vs. release) and also allow
making the choice of shared vs. static transparent.

Unfortunately it does not seem to be possible to easily combine different
crates into one cdylib crate that can re-export symbols from the
statically linked rust crates (cbindgen generated, as well as manual
extern "C").

That means for the dynamic case (not cared for right now), we're going
to need to create either one cdylib per crate that has public symbols or
manually re-export the symbols.

For the static case, linking just against the "last crate" in the chain
(the gl renderer backend) is sufficient to pull in all needed symbols.

In addition for the static case we need to specify the linkage of some
external libraries. This can be extracted manually via

    cargo rustc -p gl -- --print=native-static-libs

for example. For now that's in the changed CMakeLists.txt, but the plan
going forward is to automate this extraction in an xtask, to paste that
into the cmake target.

Finally, both linkage scenarios require access to the headers. This is
for now solved by generating them simply in an include sub-directory of
the build folder ($root/target/${profile}/include).
2020-06-04 15:29:19 +02:00
Olivier Goffart
4575011293 More work on signal: the C++ part is working 2020-05-20 19:28:58 +02:00
Olivier Goffart
638c445cf9 Support for rendering sub-elements with proper offset 2020-05-12 15:38:50 +02:00
Olivier Goffart
89f6e3529c Revert one of the previous change
The goal was to ensure that the libraries are up-to-date
2020-05-12 08:29:53 +02:00
Olivier Goffart
dbada7977e Fix C++ build 2020-05-12 08:03:18 +02:00
Simon Hausmann
83eb00b080 Run the C++ generated component through the GL backend
... which in turn forward to the corelib, but with the GL renderer attached.
2020-05-11 15:05:33 +02:00
Simon Hausmann
d24437055d Prospective build fix for GH actions build
Make sure to call cargo from within the source tree
2020-05-11 11:02:43 +02:00
Simon Hausmann
5953b10e1c Ensure the runtime library is up-to-date before linking the binary 2020-05-11 10:56:33 +02:00
Simon Hausmann
dd7d2c6dda Fix build on macOS
* Enable C++17 by default (we could do with less also... but the
  compiler does not default to C++11 at least)
* Replace the .so shared library extension with the cmake variable
  that handles different platforms
2020-05-07 15:18:10 +02:00
Olivier Goffart
b2b57887e2 add sixtyfps-cpp draft 2020-05-06 12:52:31 +02:00