fix: don't include .inc in outputs (#6154)

This commit is contained in:
nerix
2025-04-16 19:19:56 +02:00
committed by GitHub
parent 472bbbb0bc
commit 3282cac94d
2 changed files with 2 additions and 3 deletions
+1
View File
@@ -23,6 +23,7 @@
- Dev: Mini refactor of Split. (#6148)
- Dev: Conan will no longer generate a `CMakeUserPresets.json` file. (#6117)
- Dev: Pass `--force-openssl` when installing from CMake in Qt 6.8+. (#6129)
- Dev: Fixed `<build-tool> clean` not working correctly with generated sources. (#6154)
## 2.5.3
@@ -172,20 +172,18 @@ function(generate_json_impls)
foreach(_header ${arg_HEADERS})
# keep in sync with generate.py
string(REGEX REPLACE \.hpp$ .inc _def_path "${_header}")
string(REGEX REPLACE \.hpp$ .cpp _source_path "${_header}")
string(REGEX REPLACE \.hpp$ .timestamp _timestamp_path "${_header}")
string(REGEX REPLACE include[/\\]twitch-eventsub-ws[/\\] src/generated/ _source_path "${_source_path}")
cmake_path(ABSOLUTE_PATH _timestamp_path BASE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/eventsub-deps")
cmake_path(ABSOLUTE_PATH _header BASE_DIRECTORY "${arg_BASE_DIRECTORY}")
cmake_path(ABSOLUTE_PATH _def_path BASE_DIRECTORY "${arg_BASE_DIRECTORY}")
cmake_path(ABSOLUTE_PATH _source_path BASE_DIRECTORY "${arg_BASE_DIRECTORY}")
list(APPEND _all_sources "${_source_path}")
if(_generation_supported)
add_custom_command(
OUTPUT "${_timestamp_path}" "${_source_path}" "${_def_path}"
OUTPUT "${_timestamp_path}" "${_source_path}"
DEPENDS ${_gen_deps} "${_header}"
COMMENT "Generating implementation for ${_header}"
COMMAND "${_python3_path}" "${_gen_script}" "${_header}" --includes "${_inc_dirs}" --timestamp "${_timestamp_path}"