mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00

Avoid empty lines in stderr from the compiler, and make sure the description from the compile line mention the output target instead of not the source tomake it consistant with other outputs
23 lines
1.1 KiB
CMake
23 lines
1.1 KiB
CMake
# LICENSE BEGIN
|
|
# This file is part of the SixtyFPS Project -- https://sixtyfps.io
|
|
# Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
|
|
# Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
# This file is also available under commercial licensing terms.
|
|
# Please contact info@sixtyfps.io for more information.
|
|
# LICENSE END
|
|
|
|
function(SIXTYFPS_TARGET_60_SOURCES target)
|
|
foreach (it IN ITEMS ${ARGN})
|
|
get_filename_component(_60_BASE_NAME ${it} NAME_WE)
|
|
get_filename_component(_60_ABSOLUTE ${it} REALPATH BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
add_custom_command(
|
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_60_BASE_NAME}.h
|
|
COMMAND SixtyFPS::sixtyfps_compiler ${_60_ABSOLUTE} > ${CMAKE_CURRENT_BINARY_DIR}/${_60_BASE_NAME}.h
|
|
DEPENDS ${_60_ABSOLUTE}
|
|
COMMENT "Generating ${_60_BASE_NAME}.h")
|
|
target_sources(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${_60_BASE_NAME}.h)
|
|
endforeach()
|
|
target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
endfunction()
|