Commit graph

39 commits

Author SHA1 Message Date
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
Simon Hausmann
372ba09741 Prospective fix for ctest on macOS in the CI
Try manually to propagate the local environment variable for the dyld framework path

It might not get propagated across the process boundaries by itself the way github actions set it in the local environment.
2021-03-17 11:34:34 +01:00
Simon Hausmann
c68405d4dd Prospective fix for macos ctest not finding Qt
Not sure how this could happen, but we should be able to limit the rpath workaround to Linux
2021-03-17 08:52:52 +01:00
Olivier Goffart
29f930d733 Workaround test problem
Looks like the test executable need to be run from the cmake root build directory,
because it hardcodes a relative path to the library  api/sixtyfps-cpp/libsixtyfps_cpp.so
This might actually be a corrosion bug.
2021-03-16 19:49:29 +01:00
Simon Hausmann
cff1e7751d Link against SixtyFPS in the C++ unit tests 2021-03-16 16:51:01 +01:00
Olivier Goffart
ca93d12cf8 Fix cpack 2021-03-16 16:47:03 +01:00
Olivier Goffart
0e351de1a6 Create a new crate to expose the C++ 2021-03-16 16:34:02 +01:00
Simon Hausmann
ec1775f9ae Add skeleton for C++ API tests 2021-03-16 16:30:54 +01:00
Olivier Goffart
4f115edb87 Fix cmake install 2021-03-11 11:34:09 +01:00
Olivier Goffart
54c979d9e6 Make it so that you don't need to run xtask through cargo 2021-02-02 08:39:06 +01:00
Simon Hausmann
8c3ab3608a Fix corrision build
Set CARGO_MANIFEST_DIR for the bindgen xtask as when run through cargo
2021-02-01 20:27:55 +01:00
Olivier Goffart
fea2478859 Update version number everywhere 2021-01-28 16:34:13 +01:00
Olivier Goffart
dfa25b96f7 Rename SharedArray to SharedVector 2020-12-18 10:26:07 +01:00
Olivier Goffart
63a0d9308b Bump version 2020-12-14 08:49:54 +01:00
Olivier Goffart
125ec13f24 Bump version numbers
Note: this does not update the documentation yet
2020-12-07 15:41:29 +01:00
Olivier Goffart
f373d627fe Update corrosion 2020-12-07 15:32:38 +01:00
Olivier Goffart
20cfb65e53 Bump version 2020-10-22 08:41:45 +02:00
Olivier Goffart
a2a134725f Pin corrosion git hash
Because otherwise there could be breaking changes
2020-10-21 09:12:59 +02:00
Olivier Goffart
7bd77f698f cmake: use the newly introduced CRATES option from corrosion 2020-10-12 06:57:03 +02:00
Olivier Goffart
11d367467a Fix install when using a config + debug configuration 2020-10-08 11:28:42 +02:00
Olivier Goffart
2837bf3a5f CI: generate packages 2020-10-08 11:28:42 +02:00
Olivier Goffart
07c4b6cb3d CMake: Fix installation 2020-10-07 18:20:55 +02:00
Olivier Goffart
3040885c6d Fixup C++ build 2020-10-07 11:48:22 +02:00
Olivier Goffart
8b02568b4b Refactor the cmake C++ build 2020-10-07 11:40:34 +02:00