mirror of
https://github.com/H-uru/korman.git
synced 2025-07-14 02:27:36 -04:00
Fix Blender 2.79b+VS2013 build issues.
This commit is contained in:
@ -35,7 +35,7 @@ if(WIN32 AND EXISTS "${Blender_EXECUTABLE}")
|
||||
COMMAND "${dumpbin_EXECUTABLE}" /headers "${Blender_EXECUTABLE}"
|
||||
RESULTS_VARIABLE _RETURNCODE
|
||||
OUTPUT_VARIABLE _dumpbin_output
|
||||
ERROR_VARIABLE _dumpbin_error
|
||||
ERROR_VARIABLE _dumpbin_output
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
@ -57,6 +57,14 @@ if(WIN32 AND EXISTS "${Blender_EXECUTABLE}")
|
||||
endif()
|
||||
|
||||
if(EXISTS "${Blender_EXECUTABLE}")
|
||||
execute_process(
|
||||
COMMAND "${Blender_EXECUTABLE}" -b -v
|
||||
RESULTS_VARIABLE _RETURNCODE
|
||||
OUTPUT_VARIABLE _Blender_VERSION_OUTPUT
|
||||
ERROR_VARIABLE _Blender_VERSION_OUTPUT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
# Starting Blender is noisy on stdout, so all the extra characters will make sure things go right.
|
||||
# https://youtu.be/SlQFIsQ0dbs?t=19
|
||||
set(_Blender_PYTHON_EXPR
|
||||
@ -65,14 +73,14 @@ if(EXISTS "${Blender_EXECUTABLE}")
|
||||
execute_process(
|
||||
COMMAND "${Blender_EXECUTABLE}" -b --python-expr "${_Blender_PYTHON_EXPR}"
|
||||
RESULTS_VARIABLE _RETURNCODE
|
||||
OUTPUT_VARIABLE _Blender_VERSION_OUTPUT
|
||||
ERROR_VARIABLE _Blender_VERSION_OUTPUT
|
||||
OUTPUT_VARIABLE _Blender_PYTHON_OUTPUT
|
||||
ERROR_VARIABLE _Blender_PYTHON_OUTPUT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
string(REGEX MATCH [[Blender ([0-9]+\.[0-9]+)]] _match "${_Blender_VERSION_OUTPUT}")
|
||||
set(Blender_VERSION "${CMAKE_MATCH_1}")
|
||||
string(REGEX MATCH [[!!! OOGABOOGA ([0-9]+\.[0-9]+) AGOOBAGOO !!!]] _match "${_Blender_VERSION_OUTPUT}")
|
||||
string(REGEX MATCH [[!!! OOGABOOGA ([0-9]+\.[0-9]+) AGOOBAGOO !!!]] _match "${_Blender_PYTHON_OUTPUT}")
|
||||
set(Blender_PYTHON_VERSION "${CMAKE_MATCH_1}")
|
||||
endif()
|
||||
|
||||
|
@ -15,9 +15,14 @@
|
||||
|
||||
|
||||
get_filename_component(_linker_dir "${CMAKE_LINKER}" DIRECTORY)
|
||||
|
||||
# In Visual Studio 2013, the dumpbin.exe in the linker directory is missing an important DLL.
|
||||
# But, it's present in the parent directory, so prefer that one.
|
||||
get_filename_component(_msvc_bin_dir "${_linker_dir}/../" ABSOLUTE)
|
||||
|
||||
find_program(dumpbin_EXECUTABLE
|
||||
NAMES dumpbin
|
||||
PATHS ${_linker_dir}
|
||||
PATHS "${_msvc_bin_dir}" "${_linker_dir}"
|
||||
)
|
||||
|
||||
mark_as_advanced(dumpbin_EXECUTABLE)
|
||||
|
Reference in New Issue
Block a user