diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-06-22 19:30:34 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-06-22 19:30:34 +0300 |
commit | 8d17efaf7b71afa6cee252fa81b9e49016dbc118 (patch) | |
tree | 6d9a57c561bc8ffa8d0a9dfbdfcd1c06b0324f0e /build_files/cmake | |
parent | 5b19ecdc6bfe875a952731d5d2a79bb0be2e9e7e (diff) | |
parent | ab9492648398ecd9265173356d50688ddb3c9aeb (diff) |
Merge branch 'master' into sculpt-mode-features
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 33 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 4 |
2 files changed, 20 insertions, 17 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index d645b87e836..298703f69c8 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -179,11 +179,13 @@ function(blender_source_group # remove ../'s get_filename_component(_SRC_DIR ${_SRC} REALPATH) get_filename_component(_SRC_DIR ${_SRC_DIR} DIRECTORY) - if(${_SRC_DIR} MATCHES "${CMAKE_CURRENT_SOURCE_DIR}/") + string(FIND ${_SRC_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/" _pos) + if(NOT _pos EQUAL -1) string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/" "" GROUP_ID ${_SRC_DIR}) string(REPLACE "/" "\\" GROUP_ID ${GROUP_ID}) source_group("${GROUP_ID}" FILES ${_SRC}) endif() + unset(_pos) endforeach() else() # Group by location on disk @@ -249,7 +251,7 @@ function(blender_add_lib__impl add_library(${name} ${sources}) - if (NOT "${library_deps}" STREQUAL "") + if(NOT "${library_deps}" STREQUAL "") target_link_libraries(${name} INTERFACE "${library_deps}") endif() @@ -1218,18 +1220,19 @@ endmacro() # only install them at the end so the directories don't get cleared with # the files in them. used by cycles to install addon. function(delayed_install - base - files - destination) - - foreach(f ${files}) - if(IS_ABSOLUTE ${f}) - set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_FILES ${f}) - else() - set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_FILES ${base}/${f}) - endif() - set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination}) - endforeach() + base + files + destination) + + foreach(f ${files}) + if(IS_ABSOLUTE ${f}) + set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_FILES ${f}) + else() + set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_FILES ${base}/${f}) + endif() + set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination}) + endforeach() + unset(f) endfunction() # note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir @@ -1514,7 +1517,7 @@ macro(WINDOWS_SIGN_TARGET target) endmacro() macro(blender_precompile_headers target cpp header) - if (MSVC) + if(MSVC) # get the name for the pch output file get_filename_component( pchbase ${cpp} NAME_WE ) set( pchfinal "${CMAKE_CURRENT_BINARY_DIR}/${pchbase}.pch" ) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 05a92370bb1..1cde41599d0 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -30,7 +30,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang") set(MSVC_CLANG On) set(VC_TOOLS_DIR $ENV{VCToolsRedistDir} CACHE STRING "Location of the msvc redistributables") set(MSVC_REDIST_DIR ${VC_TOOLS_DIR}) - if (DEFINED MSVC_REDIST_DIR) + if(DEFINED MSVC_REDIST_DIR) file(TO_CMAKE_PATH ${MSVC_REDIST_DIR} MSVC_REDIST_DIR) else() message("Unable to detect the Visual Studio redist directory, copying of the runtime dlls will not work, try running from the visual studio developer prompt.") @@ -641,7 +641,7 @@ if(WITH_CYCLES_EMBREE) endif() endif() -if (WINDOWS_PYTHON_DEBUG) +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}) |