diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-10-22 19:19:06 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-10-22 19:19:06 +0300 |
commit | 4bf4da12de92989d5708be8b6f14c3536e872836 (patch) | |
tree | 350389c61578756f963a581ed140c3bf41264e69 /build_files | |
parent | 9d81e937d234f8c2be38550d25fcb0945066fb25 (diff) | |
parent | 86dbbd156fafccea7bfcf3207c8486fb2098b341 (diff) |
Merge remote-tracking branch 'origin/master' into blender2.8
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/macros.cmake | 6 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 37 | ||||
-rw-r--r-- | build_files/windows/configure_msbuild.cmd | 6 | ||||
-rw-r--r-- | build_files/windows/parse_arguments.cmd | 2 | ||||
-rw-r--r-- | build_files/windows/reset_variables.cmd | 2 |
5 files changed, 51 insertions, 2 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 3dc6f599c69..9d679dc9b8f 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1195,7 +1195,11 @@ function(delayed_do_install foreach(i RANGE ${n}) list(GET files ${i} f) list(GET destinations ${i} d) - install(FILES ${f} DESTINATION ${targetdir}/${d}) + if(NOT IS_ABSOLUTE ${d}) + install(FILES ${f} DESTINATION ${targetdir}/${d}) + else() + install(FILES ${f} DESTINATION ${d}) + endif() endforeach() endif() endfunction() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 0c1175df39b..b11dbfb8fba 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -606,3 +606,40 @@ if(WITH_CYCLES_OSL) set(WITH_CYCLES_OSL OFF) endif() endif() + +if (WINDOWS_PYTHON_DEBUG) + # Include the system scripts in the blender_python_system_scripts project. + FILE(GLOB_RECURSE inFiles "${CMAKE_SOURCE_DIR}/release/scripts/*.*" ) + ADD_CUSTOM_TARGET(blender_python_system_scripts SOURCES ${inFiles}) + foreach(_source IN ITEMS ${inFiles}) + get_filename_component(_source_path "${_source}" PATH) + string(REPLACE "${CMAKE_SOURCE_DIR}/release/scripts/" "" _source_path "${_source_path}") + string(REPLACE "/" "\\" _group_path "${_source_path}") + source_group("${_group_path}" FILES "${_source}") + endforeach() + # Include the user scripts from the profile folder in the blender_python_user_scripts project. + set(USER_SCRIPTS_ROOT "$ENV{appdata}/blender foundation/blender/${BLENDER_VERSION}") + file(TO_CMAKE_PATH ${USER_SCRIPTS_ROOT} USER_SCRIPTS_ROOT) + FILE(GLOB_RECURSE inFiles "${USER_SCRIPTS_ROOT}/scripts/*.*" ) + ADD_CUSTOM_TARGET(blender_python_user_scripts SOURCES ${inFiles}) + foreach(_source IN ITEMS ${inFiles}) + get_filename_component(_source_path "${_source}" PATH) + string(REPLACE "${USER_SCRIPTS_ROOT}/scripts" "" _source_path "${_source_path}") + string(REPLACE "/" "\\" _group_path "${_source_path}") + source_group("${_group_path}" FILES "${_source}") + endforeach() + set_target_properties(blender_python_system_scripts PROPERTIES FOLDER "scripts") + set_target_properties(blender_python_user_scripts PROPERTIES FOLDER "scripts") + # Set the default debugging options for the project, only write this file once so the user + # is free to override them at their own perril. + set(USER_PROPS_FILE "${CMAKE_CURRENT_BINARY_DIR}/source/creator/blender.Cpp.user.props") + if(NOT EXISTS ${USER_PROPS_FILE}) + # Layout below is messy, because otherwise the generated file will look messy. + file(WRITE ${USER_PROPS_FILE} "<?xml version=\"1.0\" encoding=\"utf-8\"?> +<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\"> + <PropertyGroup> + <LocalDebuggerCommandArguments>-con --env-system-scripts \"${CMAKE_SOURCE_DIR}/release/scripts\" </LocalDebuggerCommandArguments> + </PropertyGroup> +</Project>") + endif() +endif() diff --git a/build_files/windows/configure_msbuild.cmd b/build_files/windows/configure_msbuild.cmd index f8c2a87de8e..a0ffe0c58fd 100644 --- a/build_files/windows/configure_msbuild.cmd +++ b/build_files/windows/configure_msbuild.cmd @@ -19,7 +19,11 @@ if "%WITH_CLANG%"=="1" ( exit /b 1 ) ) -set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS% + +if "%WITH_PYDEBUG%"=="1" ( + set PYDEBUG_CMAKE_ARGS=-DWINDOWS_PYTHON_DEBUG=On +) +set BUILD_CMAKE_ARGS=%BUILD_CMAKE_ARGS% -G "Visual Studio %BUILD_VS_VER% %BUILD_VS_YEAR%%WINDOWS_ARCH%" %TESTS_CMAKE_ARGS% %CLANG_CMAKE_ARGS% %ASAN_CMAKE_ARGS% %PYDEBUG_CMAKE_ARGS% if NOT EXIST %BUILD_DIR%\nul ( mkdir %BUILD_DIR% diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd index 0b57c77a693..2c80a4d0b02 100644 --- a/build_files/windows/parse_arguments.cmd +++ b/build_files/windows/parse_arguments.cmd @@ -61,6 +61,8 @@ if NOT "%1" == "" ( shift /1 ) else if "%1" == "nobuild" ( set NOBUILD=1 + ) else if "%1" == "pydebug" ( + set WITH_PYDEBUG=1 ) else if "%1" == "showhash" ( SET BUILD_SHOW_HASHES=1 REM Non-Build Commands diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd index a522ed7407f..ba584a7f34a 100644 --- a/build_files/windows/reset_variables.cmd +++ b/build_files/windows/reset_variables.cmd @@ -25,3 +25,5 @@ set WITH_CLANG= set WITH_ASAN= set CLANG_CMAKE_ARGS= set ASAN_CMAKE_ARGS= +set WITH_PYDEBUG= +set PYDEBUG_CMAKE_ARGS= |