diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-06-10 19:38:23 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-06-10 19:38:23 +0300 |
commit | 080cf9332bc9d71e0e14326bc8efdf06b738dea1 (patch) | |
tree | e8531a509dca4d8253aa19d89edc68152421f9e5 /source/creator/CMakeLists.txt | |
parent | 6d495cc4ef071171ff0686b2be898a41e05b8051 (diff) | |
parent | 9676642cc94599b3419c9aaa5cf1aae2fbbd235f (diff) |
Merge branch 'gooseberry' into temp_motionpathstemp_motionpaths
Conflicts:
source/blender/blenkernel/intern/object.c
Diffstat (limited to 'source/creator/CMakeLists.txt')
-rw-r--r-- | source/creator/CMakeLists.txt | 125 |
1 files changed, 76 insertions, 49 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index f51b7bec7c9..c4647a86b93 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -31,11 +31,13 @@ blender_include_dirs( ../blender/blenlib ../blender/blenkernel ../blender/blenloader + ../blender/depsgraph ../blender/editors/include ../blender/makesrna ../blender/imbuf ../blender/render/extern/include ../blender/makesdna + ../blender/pointcache ../blender/gpu ../blender/windowmanager ) @@ -239,13 +241,13 @@ if(WITH_BUILDINFO) add_dependencies(blender buildinfo) endif() -# Post build steps for bundling/packaging. set(BLENDER_TEXT_FILES ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt ${CMAKE_SOURCE_DIR}/release/text/copyright.txt - ${CMAKE_SOURCE_DIR}/release/text/readme.html + # generate this file + # ${CMAKE_SOURCE_DIR}/release/text/readme.html ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt ) @@ -261,11 +263,15 @@ endif() # Platform Specific Var: TARGETDIR_VER if(UNIX AND NOT APPLE) - if(WITH_INSTALL_PORTABLE) - set(TARGETDIR_VER ${BLENDER_VERSION}) + if(WITH_PYTHON_MODULE) + if(WITH_INSTALL_PORTABLE) + set(TARGETDIR_VER ${BLENDER_VERSION}) + else() + set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION}) + endif() else() - if(WITH_PYTHON_MODULE) - set(TARGETDIR_VER ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${BLENDER_VERSION}) + if(WITH_INSTALL_PORTABLE) + set(TARGETDIR_VER ${BLENDER_VERSION}) else() set(TARGETDIR_VER share/blender/${BLENDER_VERSION}) endif() @@ -407,22 +413,31 @@ if(UNIX AND NOT APPLE) endif() # there are a few differences between portable and system install - if(WITH_INSTALL_PORTABLE) - if(WITH_PYTHON_MODULE) - # pass + if(WITH_PYTHON_MODULE) + if(WITH_INSTALL_PORTABLE) + install( + TARGETS blender + DESTINATION "." + ) else() - if(WITH_DOC_MANPAGE) - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 - DESTINATION "." - ) - endif() + install( + TARGETS blender + LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES} + ) endif() + # none of the other files are needed currently + elseif(WITH_INSTALL_PORTABLE) install( TARGETS blender DESTINATION "." ) + if(WITH_DOC_MANPAGE) + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 + DESTINATION "." + ) + endif() install( FILES ${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop @@ -436,30 +451,19 @@ if(UNIX AND NOT APPLE) DESTINATION "." ) - install( - FILES ${BLENDER_TEXT_FILES} - DESTINATION "." - ) - + set(BLENDER_TEXT_FILES_DESTINATION ".") else() # main blender binary - if(WITH_PYTHON_MODULE) - install( - TARGETS blender - LIBRARY DESTINATION ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages - ) - else() + install( + TARGETS blender + DESTINATION bin + ) + if(WITH_DOC_MANPAGE) + # manpage only with 'blender' binary install( - TARGETS blender - DESTINATION bin + FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 + DESTINATION share/man/man1 ) - if(WITH_DOC_MANPAGE) - # manpage only with 'blender' binary - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1 - DESTINATION share/man/man1 - ) - endif() endif() # misc files @@ -486,14 +490,17 @@ if(UNIX AND NOT APPLE) PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py DESTINATION bin ) - install( - FILES ${BLENDER_TEXT_FILES} - DESTINATION share/doc/blender - ) + set(BLENDER_TEXT_FILES_DESTINATION share/doc/blender) endif() if(WITH_PYTHON) if(WITH_PYTHON_INSTALL) + + install( + FILES ${PYTHON_EXECUTABLE} + DESTINATION ${TARGETDIR_VER}/python/bin + ) + # on some platforms (like openSUSE) Python is linked # to be used from lib64 folder. # determine this from Python's libraries path @@ -602,10 +609,7 @@ if(UNIX AND NOT APPLE) endif() elseif(WIN32) - install( - FILES ${BLENDER_TEXT_FILES} - DESTINATION "." - ) + set(BLENDER_TEXT_FILES_DESTINATION ".") if(WITH_PYTHON) string(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION}) @@ -647,9 +651,9 @@ elseif(WIN32) execute_process( COMMAND \${CMAKE_COMMAND} -E make_directory - \"\${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python/lib\" + \"\${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python\" COMMAND \${CMAKE_COMMAND} -E - chdir \"\${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python/lib\" + chdir \"\${CMAKE_INSTALL_PREFIX}/${BLENDER_VERSION}/python\" \${CMAKE_COMMAND} -E tar xzfv \"\${PYTHON_ZIP}\" ) @@ -847,10 +851,7 @@ elseif(APPLE) ) # install release and app files - install( - FILES ${BLENDER_TEXT_FILES} - DESTINATION blender.app/Contents - ) + set(BLENDER_TEXT_FILES_DESTINATION ".") install( FILES ${OSX_APP_SOURCEDIR}/Contents/PkgInfo @@ -867,6 +868,11 @@ elseif(APPLE) FILES ${LIBDIR}/openmp/lib/libiomp5.dylib DESTINATION blender.app/Contents/Resources/lib/ ) + install( + FILES ${LIBDIR}/openmp/LICENSE.txt + DESTINATION "." + RENAME LICENSE-libiomp5.txt + ) endif() if(WITH_LLVM AND NOT LLVM_STATIC) @@ -968,12 +974,33 @@ endif() # ----------------------------------------------------------------------------- # Generic Install, for all targets +if(DEFINED BLENDER_TEXT_FILES_DESTINATION) + + install( + CODE + " + file(READ \"${CMAKE_SOURCE_DIR}/release/text/readme.html\" DATA_SRC) + string(REGEX REPLACE \"BLENDER_VERSION\" \"${BLENDER_VERSION}\" DATA_DST \"\${DATA_SRC}\") + file(WRITE \"\${CMAKE_BINARY_DIR}/release/text/readme.html\" \"\${DATA_DST}\") + unset(DATA_SRC) + unset(DATA_DST) + " + ) + list(APPEND BLENDER_TEXT_FILES + ${CMAKE_BINARY_DIR}/release/text/readme.html + ) + install( + FILES ${BLENDER_TEXT_FILES} + DESTINATION "${BLENDER_TEXT_FILES_DESTINATION}" + ) +endif() # install more files specified elsewhere delayed_do_install(${TARGETDIR_VER}) unset(BLENDER_TEXT_FILES) +unset(BLENDER_TEXT_FILES_DESTINATION) # ----------------------------------------------------------------------------- |