CMake patch from Ralf Hölzemer (cheleb)

[#22849] Fix cmake install target on linux
--- from the tracker ---
This patch fixes the install target for the linux platform. Since the new configuration path changes are in effect, files have to be installed in the correct places instead of just copying the local installation to $PREFIX/share/blender.

It also provides a new macro to determine the correct blender version values.

Changes in this patch include:

- the .desktop menu file is installed in $PREFIX/share/applications and points to the svg icon instead of a png one, which is also installed in $PREFIX/share/pixmaps
- docs are installed in $PREFIX/share/doc/blender
- scripts are installed in in $PREFIX/share/blender/x.xx/
- locales are installed in in $PREFIX/share/blender/x.xx/datafiles
- a new cmake macro determines and sets the correct values for BLENDER_VERSION_MAJOR, BLENDER_VERSION_MINOR, BLENDER_SUBVERSION, BLENDER_VERSION, BLENDER_MINVERSION_MAJOR, BLENDER_MINVERSION_MINOR, BLENDER_MINSUBVERSION and BLENDER_MINVERSION by parsing source/blender/blenkernel/BKE_blender.h and calculating major/minor values. This replaces the hardcoded value in the top CMakeLists file and is used by all platforms.
This commit is contained in:
Campbell Barton
2010-07-14 20:26:46 +00:00
parent eb4795be57
commit 1bb789956d
4 changed files with 61 additions and 8 deletions

View File

@@ -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)