diff --git a/.gitignore b/.gitignore index 3848a1bd8..09f29ab48 100644 --- a/.gitignore +++ b/.gitignore @@ -448,5 +448,5 @@ _packages */extract_assets_cmake* /build* -soh/build.c +soh/src/boot/build.c soh/properties.h diff --git a/soh/CMakeLists.txt b/soh/CMakeLists.txt index f653c5de5..4ed9fec72 100644 --- a/soh/CMakeLists.txt +++ b/soh/CMakeLists.txt @@ -105,8 +105,8 @@ set(PROJECT_NAME soh) ################################################################################ # Sources ################################################################################ -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/build.c.in ${CMAKE_BINARY_DIR}/build.c @ONLY) -configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/properties.h.in ${CMAKE_CURRENT_SOURCE_DIR}/properties.h @ONLY) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/build.c.in ${CMAKE_CURRENT_SOURCE_DIR}/src/boot/build.c @ONLY) +configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/properties.h.in ${CMAKE_CURRENT_SOURCE_DIR}/properties.h @ONLY) set(Header_Files "resource.h") source_group("headers" FILES ${Header_Files}) @@ -217,8 +217,6 @@ source_group("soh\\resource\\importer\\scenecommand" REGULAR_EXPRESSION "soh/res # src (decomp) {{{ file(GLOB_RECURSE src__ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.c" "src/*.h") -list(APPEND src__ ${CMAKE_BINARY_DIR}/build.c) -list(APPEND src__ ${CMAKE_CURRENT_SOURCE_DIR}/properties.h) list(APPEND src__ ${CMAKE_CURRENT_SOURCE_DIR}/Resource.rc) list(FILTER src__ EXCLUDE REGEX "src/dmadata/*") list(FILTER src__ EXCLUDE REGEX "src/elf_message/*") @@ -238,7 +236,6 @@ list(REMOVE_ITEM src__ "src/libultra/gu/sqrtf.c") list(REMOVE_ITEM src__ "src/libultra/gu/us2dex.c") source_group("src" REGULAR_EXPRESSION "src/*") -source_group("src\\build" FILES ${CMAKE_BINARY_DIR}/build.c ${CMAKE_CURRENT_SOURCE_DIR}/properties.h ${CMAKE_CURRENT_SOURCE_DIR}/Resource.rc) source_group("src\\boot" REGULAR_EXPRESSION "src/boot/*") source_group("src\\buffers" REGULAR_EXPRESSION "src/buffers/*") source_group("src\\code" REGULAR_EXPRESSION "src/code/*") @@ -650,15 +647,6 @@ endif() ################################################################################ # Pre build events ################################################################################ -if (CMAKE_SYSTEM_NAME STREQUAL "Windows") - add_custom_command_if( - TARGET ${PROJECT_NAME} - PRE_BUILD - COMMANDS - COMMAND $ copy /b $build.c +,, - ) -endif() - if(NOT CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS") add_custom_command( TARGET ${PROJECT_NAME} diff --git a/soh/src/boot/properties.h.in b/soh/properties.h.in similarity index 100% rename from soh/src/boot/properties.h.in rename to soh/properties.h.in diff --git a/soh/src/boot/build.c.in b/soh/src/boot/build.c.in index 4fc6a17f4..4d6a07ce6 100644 --- a/soh/src/boot/build.c.in +++ b/soh/src/boot/build.c.in @@ -4,6 +4,7 @@ const char gBuildVersion[] = "@PROJECT_BUILD_NAME@ (@CMAKE_PROJECT_VERSION_MAJOR const u16 gBuildVersionMajor = @CMAKE_PROJECT_VERSION_MAJOR@; const u16 gBuildVersionMinor = @CMAKE_PROJECT_VERSION_MINOR@; const u16 gBuildVersionPatch = @CMAKE_PROJECT_VERSION_PATCH@; + const char gBuildTeam[] = "@PROJECT_TEAM@"; const char gBuildDate[] = __DATE__ " " __TIME__; const char gBuildMakeOption[] = "";