Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--build_files/cmake/macros.cmake33
-rw-r--r--release/freedesktop/blender.desktop2
-rw-r--r--source/creator/CMakeLists.txt28
4 files changed, 61 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 70ec8952ce1..bec1353a8cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,10 +55,6 @@ PROJECT(Blender)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
-# Note! - Could create this from the blender version string
-# ...but thats quite involved, make sure this matches the blender version.
-SET(BLENDER_VERSION 2.5)
-
#-----------------------------------------------------------------------------
# Load some macros.
INCLUDE(build_files/cmake/macros.cmake)
@@ -66,6 +62,8 @@ INCLUDE(build_files/cmake/macros.cmake)
#-----------------------------------------------------------------------------
# Set default config options
+GET_BLENDER_VERSION()
+
# Blender internal features
OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
OPTION(WITH_LCMS "Enable color correction with lcms" OFF)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index aec86f7467a..84e6b788dc0 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -198,3 +198,36 @@ MACRO(TEST_SSE_SUPPORT)
SUPPORT_SSE_BUILD)
ENDMACRO(TEST_SSE_SUPPORT)
+MACRO(GET_BLENDER_VERSION)
+ FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)
+ STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
+ STRING(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}")
+ STRING(REGEX REPLACE " " ";" CONTENT "${CONTENT}")
+
+ FOREACH(ITEM ${CONTENT})
+ IF(LASTITEM MATCHES "BLENDER_VERSION")
+ MATH(EXPR BLENDER_VERSION_MAJOR "${ITEM} / 100")
+ MATH(EXPR BLENDER_VERSION_MINOR "${ITEM} % 100")
+ SET(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
+ ENDIF(LASTITEM MATCHES "BLENDER_VERSION")
+
+ IF(LASTITEM MATCHES "BLENDER_SUBVERSION")
+ SET(BLENDER_SUBVERSION ${ITEM})
+ ENDIF(LASTITEM MATCHES "BLENDER_SUBVERSION")
+
+ IF(LASTITEM MATCHES "BLENDER_MINVERSION")
+ MATH(EXPR BLENDER_MINVERSION_MAJOR "${ITEM} / 100")
+ MATH(EXPR BLENDER_MINVERSION_MINOR "${ITEM} % 100")
+ SET(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}")
+ ENDIF(LASTITEM MATCHES "BLENDER_MINVERSION")
+
+ IF(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
+ SET(BLENDER_MINSUBVERSION ${ITEM})
+ ENDIF(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
+
+ SET(LASTITEM ${ITEM})
+ ENDFOREACH(ITEM ${CONTENT})
+
+ MESSAGE(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}")
+ MESSAGE(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}")
+ENDMACRO(GET_BLENDER_VERSION)
diff --git a/release/freedesktop/blender.desktop b/release/freedesktop/blender.desktop
index 39e0e3afe8e..1069958f6f1 100644
--- a/release/freedesktop/blender.desktop
+++ b/release/freedesktop/blender.desktop
@@ -3,7 +3,7 @@ Encoding=UTF-8
Name=Blender
Comment=3D modeling, animation, rendering and post-production
Exec=blender
-Icon=blender.png
+Icon=blender.svg
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 36fd67c85c6..e9e6c982fde 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -192,9 +192,31 @@ IF(WITH_INSTALL)
ENDIF(WITH_GAMEENGINE AND WITH_PLAYER)
INSTALL(
- DIRECTORY ${TARGETDIR}/.blender/
- DESTINATION ${BLENDERPATH}
- )
+ FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
+ )
+ INSTALL(
+ FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/blender.svg
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
+ )
+ INSTALL(
+ DIRECTORY ${CMAKE_SOURCE_DIR}/release/text/
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender
+ PATTERN ".svn" EXCLUDE
+ )
+ INSTALL(
+ DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts/
+ DESTINATION ${BLENDERPATH}/scripts
+ PATTERN ".svn" EXCLUDE
+ )
+ IF(WITH_INTERNATIONAL)
+ INSTALL(
+ DIRECTORY ${CMAKE_SOURCE_DIR}/bin/.blender/locale/
+ DESTINATION ${BLENDERPATH}/datafiles/locale
+ PATTERN ".svn" EXCLUDE
+ )
+ ENDIF(WITH_INTERNATIONAL)
+
# end "make install"
ENDIF(UNIX AND NOT APPLE)