mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-22 07:04:54 -04:00
Pick up newly added source files without a manual re-configure (#7060)
The source globs did not use CONFIGURE_DEPENDS, so adding a file under soh/ or src/ left it out of the build until cmake was re-run by hand, silently and with no warning. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -117,7 +117,7 @@ set(Header_Files "resource.h")
|
|||||||
source_group("headers" FILES ${Header_Files})
|
source_group("headers" FILES ${Header_Files})
|
||||||
|
|
||||||
# include {{{
|
# include {{{
|
||||||
file(GLOB Header_Files__include "include/*.h" "include/*.inc")
|
file(GLOB Header_Files__include CONFIGURE_DEPENDS "include/*.h" "include/*.inc")
|
||||||
list(APPEND Header_Files__include ${CMAKE_CURRENT_SOURCE_DIR}/include/libc/stdarg.h)
|
list(APPEND Header_Files__include ${CMAKE_CURRENT_SOURCE_DIR}/include/libc/stdarg.h)
|
||||||
list(REMOVE_ITEM Header_Files__include ${CMAKE_CURRENT_SOURCE_DIR}/include/bgm.h)
|
list(REMOVE_ITEM Header_Files__include ${CMAKE_CURRENT_SOURCE_DIR}/include/bgm.h)
|
||||||
list(REMOVE_ITEM Header_Files__include ${CMAKE_CURRENT_SOURCE_DIR}/include/math_n64.h)
|
list(REMOVE_ITEM Header_Files__include ${CMAKE_CURRENT_SOURCE_DIR}/include/math_n64.h)
|
||||||
@@ -129,7 +129,7 @@ source_group("include" FILES ${Header_Files__include})
|
|||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# soh (root)
|
# soh (root)
|
||||||
file(GLOB_RECURSE soh__ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "soh/*.c" "soh/*.cpp" "soh/*.h" "soh/*.hpp")
|
file(GLOB_RECURSE soh__ CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "soh/*.c" "soh/*.cpp" "soh/*.h" "soh/*.hpp")
|
||||||
|
|
||||||
# Add specific files that don't match the pattern
|
# Add specific files that don't match the pattern
|
||||||
list(APPEND soh__ ${CMAKE_CURRENT_SOURCE_DIR}/soh/Enhancements/speechsynthesizer/DarwinSpeechSynthesizer.mm)
|
list(APPEND soh__ ${CMAKE_CURRENT_SOURCE_DIR}/soh/Enhancements/speechsynthesizer/DarwinSpeechSynthesizer.mm)
|
||||||
@@ -167,14 +167,14 @@ endif()
|
|||||||
list(FILTER ship__ EXCLUDE REGEX "soh/Extractor/*")
|
list(FILTER ship__ EXCLUDE REGEX "soh/Extractor/*")
|
||||||
|
|
||||||
if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
||||||
file(GLOB_RECURSE soh__Extractor RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
file(GLOB_RECURSE soh__Extractor CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
"soh/Extractor/*.c"
|
"soh/Extractor/*.c"
|
||||||
"soh/Extractor/*.cpp"
|
"soh/Extractor/*.cpp"
|
||||||
"soh/Extractor/*.h"
|
"soh/Extractor/*.h"
|
||||||
"soh/Extractor/*.hpp"
|
"soh/Extractor/*.hpp"
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
file(GLOB_RECURSE soh__Extractor RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
file(GLOB_RECURSE soh__Extractor CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
"soh/Extractor/*.h"
|
"soh/Extractor/*.h"
|
||||||
"soh/Extractor/*.hpp"
|
"soh/Extractor/*.hpp"
|
||||||
)
|
)
|
||||||
@@ -182,7 +182,7 @@ endif()
|
|||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# src (decomp) {{{
|
# src (decomp) {{{
|
||||||
file(GLOB_RECURSE src__ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.c" "src/*.h")
|
file(GLOB_RECURSE src__ CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.c" "src/*.h")
|
||||||
set_source_files_properties(${src__} PROPERTIES COMPILE_OPTIONS "${WARNING_OVERRIDE}")
|
set_source_files_properties(${src__} PROPERTIES COMPILE_OPTIONS "${WARNING_OVERRIDE}")
|
||||||
|
|
||||||
list(APPEND src__ ${CMAKE_CURRENT_SOURCE_DIR}/Resource.rc)
|
list(APPEND src__ ${CMAKE_CURRENT_SOURCE_DIR}/Resource.rc)
|
||||||
|
|||||||
Reference in New Issue
Block a user