mirror of https://github.com/AxioDL/metaforce.git
Fix blender detection and build errors on linux
This commit is contained in:
parent
60c6a6bf2b
commit
1b2ee6749d
|
@ -12,6 +12,8 @@ if(APPLE)
|
||||||
set(PLAT_SRCS MacOSSystemVersion.hpp MacOSSystemVersion.mm)
|
set(PLAT_SRCS MacOSSystemVersion.hpp MacOSSystemVersion.mm)
|
||||||
find_library(FOUNDATION_LIBRARY Foundation)
|
find_library(FOUNDATION_LIBRARY Foundation)
|
||||||
set(PLAT_LIBS ${FOUNDATION_LIBRARY})
|
set(PLAT_LIBS ${FOUNDATION_LIBRARY})
|
||||||
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||||
|
set(PLAT_LIBS pthread dl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
|
@ -7,6 +7,8 @@ namespace hecl::blender
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define DEFAULT_BLENDER_BIN "/Applications/Blender.app/Contents/MacOS/blender"
|
#define DEFAULT_BLENDER_BIN "/Applications/Blender.app/Contents/MacOS/blender"
|
||||||
|
#elif __linux__
|
||||||
|
#define DEFAULT_BLENDER_BIN "/usr/bin/blender"
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_BLENDER_BIN "blender"
|
#define DEFAULT_BLENDER_BIN "blender"
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,6 +89,14 @@ hecl::SystemString FindBlender(int& major, int& minor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
blenderBin = DEFAULT_BLENDER_BIN;
|
||||||
|
if (!RegFileExists(blenderBin))
|
||||||
|
{
|
||||||
|
blenderBin = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue