2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:04:56 +00:00

Blender Python API updates and better CMake dependency handling

This commit is contained in:
Jack Andersen
2019-06-11 16:01:19 -10:00
parent 7cc157c8b9
commit 387f8fa864
26 changed files with 73 additions and 112 deletions

View File

@@ -1,8 +1,4 @@
if(NOT WINDOWS_STORE)
if(TARGET nod)
include_directories(${NOD_INCLUDE_DIR})
add_definitions(-DHECL_HAS_NOD=1)
endif()
add_executable(hecl main.cpp
ToolBase.hpp
@@ -27,16 +23,13 @@ if(APPLE)
list(APPEND PLAT_LIBS ${CF_LIBRARY})
endif()
target_link_libraries(hecl
${DATA_SPEC_LIBS}
hecl-full hecl-blender-addon athena-core nod
logvisor athena-libyaml ${PNG_LIB} squish xxhash zeus boo
${ZLIB_LIBRARIES} lzokay ${PLAT_LIBS} ${BOO_SYS_LIBS})
target_link_libraries(hecl PUBLIC ${DATA_SPEC_LIBS} hecl-full)
set_target_properties(hecl PROPERTIES COMPILE_DEFINITIONS HECL_DLPACKAGE="${HECL_DLPACKAGE}")
if(TARGET nod)
target_link_libraries(hecl PUBLIC nod)
target_compile_definitions(hecl PUBLIC HECL_HAS_NOD=1)
endif()
target_compile_definitions(hecl PRIVATE HECL_DLPACKAGE="${HECL_DLPACKAGE}")
if(COMMAND cotire)
set_target_properties(hecl PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
cotire(hecl)
endif()
endif()

View File

@@ -111,7 +111,7 @@ public:
};
if (id[0] == 'G') {
fileOut += _SYS_STR(".gcm");
if (nod::DiscBuilderGCN::CalculateTotalSizeRequired(outPath.getAbsolutePath()) == -1)
if (nod::DiscBuilderGCN::CalculateTotalSizeRequired(outPath.getAbsolutePath()) == UINT64_MAX)
return 1;
LogModule.report(logvisor::Info, _SYS_STR("Generating %s as GameCube image"), fileOut.c_str());
nod::DiscBuilderGCN db(fileOut, progFunc);
@@ -120,7 +120,7 @@ public:
} else {
fileOut += _SYS_STR(".iso");
bool dualLayer;
if (nod::DiscBuilderWii::CalculateTotalSizeRequired(outPath.getAbsolutePath(), dualLayer) == -1)
if (nod::DiscBuilderWii::CalculateTotalSizeRequired(outPath.getAbsolutePath(), dualLayer) == UINT64_MAX)
return 1;
LogModule.report(logvisor::Info, _SYS_STR("Generating %s as %s-layer Wii image"), fileOut.c_str(),
dualLayer ? _SYS_STR("dual") : _SYS_STR("single"));

View File

@@ -31,7 +31,7 @@ logvisor::Module LogModule("hecl::Driver");
/* Static reference to dataspec additions
* (used by MSVC to definitively link DataSpecs) */
#include "../DataSpecRegistry.hpp"
#include "DataSpecRegistry.hpp"
bool XTERM_COLOR = false;