mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-27 12:29:41 +00:00

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.
26 lines
889 B
CMake
26 lines
889 B
CMake
@PACKAGE_INIT@
|
|
|
|
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
|
if(_IMPORT_PREFIX STREQUAL "/")
|
|
set(_IMPORT_PREFIX "")
|
|
endif()
|
|
|
|
foreach(internal_lib IN ITEMS @internal_libs@)
|
|
add_library(${internal_lib} STATIC IMPORTED)
|
|
set(fn "${internal_lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
|
# Don't look in lib when we're inside a cargo tree, as cargo doesn't use a lib/ sub-dir.
|
|
if(EXISTS "${_IMPORT_PREFIX}/${fn}")
|
|
else()
|
|
set(fn "lib/${fn}")
|
|
endif()
|
|
set_property(TARGET ${internal_lib} PROPERTY IMPORTED_LOCATION "${_IMPORT_PREFIX}/${fn}")
|
|
|
|
set(fn)
|
|
endforeach()
|
|
|
|
set(_IMPORT_PREFIX)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/SixtyFPSTargets.cmake")
|