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{...}
This commit is contained in:
Simon Hausmann 2023-10-06 11:37:53 +02:00 committed by Simon Hausmann
parent e34cd741a8
commit 292f487815
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ add_feature_info(SLINT_FEATURE_COMPILER SLINT_FEATURE_COMPILER "Enable support f
option(SLINT_BUILD_RUNTIME "Actually build the Slint runtime libraries (Disable that to only build the compiler)" ON)
add_feature_info(SLINT_BUILD_RUNTIME SLINT_BUILD_RUNTIME "Actually build the Slint runtime libraries (Disable that to only build the compiler)")
set(SLINT_COMPILER "" CACHE FILEPATH "Path to the slint-compiler executable. When unset, it the compiler will be build as part of the build process")
set(SLINT_COMPILER "" CACHE STRING "Path to the slint-compiler executable. When unset, it the compiler will be build as part of the build process")
set(SLINT_LIBRARY_CARGO_FLAGS "" CACHE STRING
"Flags to pass to cargo when building the Slint runtime library")

View file

@ -14,7 +14,7 @@ endif()
add_library(@slint_cpp_impl@ @cmake_lib_type@ IMPORTED)
set_target_properties(@slint_cpp_impl@ PROPERTIES @SLINT_LIB_PROPERTIES@)
set(SLINT_COMPILER @SLINT_COMPILER@ CACHE FILEPATH "Path to the slint-compiler executable")
set(SLINT_COMPILER @SLINT_COMPILER@ CACHE STRING "Path to the slint-compiler executable")
if (SLINT_COMPILER)
set(SLINT_STYLE @_SLINT_STYLE@ CACHE STRING "The Slint widget style")
add_executable(Slint::slint-compiler IMPORTED GLOBAL)