diff options
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/Modules/FindGLEW.cmake | 2 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenCOLLADA.cmake | 5 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenColorIO.cmake | 10 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenEXR.cmake | 6 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenGLES.cmake | 1 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenImageIO.cmake | 2 | ||||
-rw-r--r-- | build_files/cmake/Modules/FindOpenJPEG.cmake | 2 | ||||
-rw-r--r-- | build_files/cmake/buildinfo.cmake | 8 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 34 | ||||
-rw-r--r-- | build_files/cmake/packaging.cmake | 6 |
10 files changed, 58 insertions, 18 deletions
diff --git a/build_files/cmake/Modules/FindGLEW.cmake b/build_files/cmake/Modules/FindGLEW.cmake index 8589e143ada..2f098d5d9a4 100644 --- a/build_files/cmake/Modules/FindGLEW.cmake +++ b/build_files/cmake/Modules/FindGLEW.cmake @@ -75,3 +75,5 @@ MARK_AS_ADVANCED( GLEW_LIBRARY GLEW_MX_LIBRARY ) + +UNSET(_glew_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/FindOpenCOLLADA.cmake b/build_files/cmake/Modules/FindOpenCOLLADA.cmake index 84aead58b60..1c10d5a71de 100644 --- a/build_files/cmake/Modules/FindOpenCOLLADA.cmake +++ b/build_files/cmake/Modules/FindOpenCOLLADA.cmake @@ -140,3 +140,8 @@ IF(OPENCOLLADA_FOUND) SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES}) SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES}) ENDIF(OPENCOLLADA_FOUND) + +UNSET(COMPONENT) +UNSET(UPPERCOMPONENT) +UNSET(_opencollada_LIBRARIES) +UNSET(_opencollada_INCLUDES) diff --git a/build_files/cmake/Modules/FindOpenColorIO.cmake b/build_files/cmake/Modules/FindOpenColorIO.cmake index e152f0f81d9..ac486a13a6d 100644 --- a/build_files/cmake/Modules/FindOpenColorIO.cmake +++ b/build_files/cmake/Modules/FindOpenColorIO.cmake @@ -63,11 +63,12 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS}) PATH_SUFFIXES lib64 lib ) - if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY) + IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY) LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}") - endif() + ENDIF() ENDFOREACH() + # handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) @@ -84,3 +85,8 @@ MARK_AS_ADVANCED( OPENCOLORIO_LIBRARY ) +UNSET(COMPONENT) +UNSET(UPPERCOMPONENT) +UNSET(_opencolorio_FIND_COMPONENTS) +UNSET(_opencolorio_LIBRARIES) +UNSET(_opencolorio_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/FindOpenEXR.cmake b/build_files/cmake/Modules/FindOpenEXR.cmake index 1c59ef49e59..8554da14f31 100644 --- a/build_files/cmake/Modules/FindOpenEXR.cmake +++ b/build_files/cmake/Modules/FindOpenEXR.cmake @@ -137,3 +137,9 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS}) STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY) ENDFOREACH() + +UNSET(COMPONENT) +UNSET(UPPERCOMPONENT) +UNSET(_openexr_FIND_COMPONENTS) +UNSET(_openexr_LIBRARIES) +UNSET(_openexr_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/FindOpenGLES.cmake b/build_files/cmake/Modules/FindOpenGLES.cmake index 1bb06c2f31c..9efb9408141 100644 --- a/build_files/cmake/Modules/FindOpenGLES.cmake +++ b/build_files/cmake/Modules/FindOpenGLES.cmake @@ -74,3 +74,4 @@ MARK_AS_ADVANCED( OPENGLES_INCLUDE_DIR ) +UNSET(_opengles_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/FindOpenImageIO.cmake b/build_files/cmake/Modules/FindOpenImageIO.cmake index 9b8c8b075b1..39049981385 100644 --- a/build_files/cmake/Modules/FindOpenImageIO.cmake +++ b/build_files/cmake/Modules/FindOpenImageIO.cmake @@ -69,3 +69,5 @@ MARK_AS_ADVANCED( OPENIMAGEIO_INCLUDE_DIR OPENIMAGEIO_LIBRARY ) + +UNSET(_openimageio_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/FindOpenJPEG.cmake b/build_files/cmake/Modules/FindOpenJPEG.cmake index 8bd1a584ac7..d765103638b 100644 --- a/build_files/cmake/Modules/FindOpenJPEG.cmake +++ b/build_files/cmake/Modules/FindOpenJPEG.cmake @@ -69,3 +69,5 @@ MARK_AS_ADVANCED( OPENJPEG_INCLUDE_DIR OPENJPEG_LIBRARY ) + +UNSET(_openjpeg_SEARCH_DIRS) diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake index fecd19c62e2..8ef29b06213 100644 --- a/build_files/cmake/buildinfo.cmake +++ b/build_files/cmake/buildinfo.cmake @@ -146,6 +146,14 @@ file(WRITE buildinfo.h.txt "#define BUILD_TIME \"${BUILD_TIME}\"\n" ) +# cleanup +unset(MY_WC_HASH) +unset(MY_WC_COMMIT_TIMESTAMP) +unset(MY_WC_BRANCH) +unset(BUILD_DATE) +unset(BUILD_TIME) + + # Copy the file to the final header only if the version changes # and avoid needless rebuilds # TODO: verify this comment is true, as BUILD_TIME probably changes diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 70109cb5355..079307cb87c 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -998,7 +998,7 @@ macro(ADD_CHECK_CXX_COMPILER_FLAG endif() endmacro() -macro(get_blender_version) +function(get_blender_version) # So cmake depends on BKE_blender.h, beware of inf-loops! CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h ${CMAKE_BINARY_DIR}/source/blender/blenkernel/BKE_blender.h.done) @@ -1035,29 +1035,22 @@ macro(get_blender_version) math(EXPR BLENDER_VERSION_MINOR "${_out_version} % 100") set(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}") - set(BLENDER_SUBVERSION ${_out_subversion}) - set(BLENDER_VERSION_CHAR ${_out_version_char}) - set(BLENDER_VERSION_CYCLE ${_out_version_cycle}) + set(BLENDER_SUBVERSION ${_out_subversion} PARENT_SCOPE) + set(BLENDER_VERSION_CHAR ${_out_version_char} PARENT_SCOPE) + set(BLENDER_VERSION_CYCLE ${_out_version_cycle} PARENT_SCOPE) # for packaging, alpha to numbers string(COMPARE EQUAL "${BLENDER_VERSION_CHAR}" "" _out_version_char_empty) if(${_out_version_char_empty}) - set(BLENDER_VERSION_CHAR_INDEX "0") + set(BLENDER_VERSION_CHAR_INDEX "0" PARENT_SCOPE) else() set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z) list(FIND _char_ls ${BLENDER_VERSION_CHAR} _out_version_char_index) - math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1") - unset(_char_ls) - unset(_out_version_char_index) + math(EXPR BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index} + 1" PARENT_SCOPE) endif() - unset(_out_subversion) - unset(_out_version_char) - unset(_out_version_char_empty) - unset(_out_version_cycle) - # message(STATUS "Version (Internal): ${BLENDER_VERSION}.${BLENDER_SUBVERSION}, Version (external): ${BLENDER_VERSION}${BLENDER_VERSION_CHAR}-${BLENDER_VERSION_CYCLE}") -endmacro() +endfunction() # hacks to override initial project settings @@ -1154,6 +1147,7 @@ macro(delayed_install endif() set_property(GLOBAL APPEND PROPERTY DELAYED_INSTALL_DESTINATIONS ${destination}) endforeach() + unset(f) endmacro() # note this is a function instead of a macro so that ${BUILD_TYPE} in targetdir @@ -1173,6 +1167,7 @@ function(delayed_do_install list(GET destinations ${i} d) install(FILES ${f} DESTINATION ${targetdir}/${d}) endforeach() + unset(f) endif() endfunction() @@ -1387,3 +1382,14 @@ macro(find_python_package unset(_upper_package) endmacro() + +# like Python's 'print(dir())' +macro(print_all_vars) + get_cmake_property(_vars VARIABLES) + foreach(_var ${_vars}) + message("${_var}=${${_var}}") + endforeach() + unset(_vars) + unset(_var) +endmacro() + diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake index fbd5dad25e8..95bbb2b59a8 100644 --- a/build_files/cmake/packaging.cmake +++ b/build_files/cmake/packaging.cmake @@ -2,7 +2,6 @@ set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/rende set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation") set(PROJECT_CONTACT "foundation@blender.org") set(PROJECT_VENDOR "Blender Foundation") -set(ORG_WEBSITE "www.blender.org") set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR}) set(MINOR_VERSION ${BLENDER_VERSION_MINOR}) @@ -32,6 +31,7 @@ if(EXISTS ${CMAKE_SOURCE_DIR}/.git/) endif() endif() set(BUILD_REV ${MY_WC_HASH}) +unset(MY_WC_HASH) # Force Package Name @@ -41,7 +41,7 @@ set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${ if(CMAKE_SYSTEM_NAME MATCHES "Linux") # RPM packages include(build_files/cmake/RpmBuild.cmake) - if(RPMBUILD_FOUND AND NOT WIN32) + if(RPMBUILD_FOUND) set(CPACK_GENERATOR "RPM") set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}") set(CPACK_SET_DESTDIR "true") @@ -94,6 +94,8 @@ macro(add_package_archive packagename extension) OUTPUT ${package_output} COMMAND ${build_archive} ${packagename} ${extension} bin release WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + unset(build_archive) + unset(package_output) endmacro() if(APPLE) |