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:
Diffstat (limited to 'source/creator/CMakeLists.txt')
-rw-r--r--source/creator/CMakeLists.txt26
1 files changed, 22 insertions, 4 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 122c10ef216..4e8dd6f9fd3 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -172,18 +172,28 @@ if(WITH_BUILDINFO)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
- # XXX, "_buildinfo.h" is used twice here,
+ # XXX, ${buildinfo_h_fake} is used here,
# because we rely on that file being detected as missing
# every build so that the real header "buildinfo.h" is updated.
#
# Keep this until we find a better way to resolve!
+ set(buildinfo_h_real "${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h")
+ set(buildinfo_h_fake "${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h_fake")
+
+ if(EXISTS ${buildinfo_h_fake})
+ message(FATAL_ERROR "File \"${buildinfo_h_fake}\" found, this should never be created, remove!")
+ endif()
+
# a custom target that is always built
add_custom_target(buildinfo ALL
- DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_buildinfo.h)
+ DEPENDS ${buildinfo_h_fake})
# creates buildinfo.h using cmake script
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_buildinfo.h
+ add_custom_command(
+ OUTPUT
+ ${buildinfo_h_fake} # ensure we always run
+ ${buildinfo_h_real}
COMMAND ${CMAKE_COMMAND}
-DSOURCE_DIR=${CMAKE_SOURCE_DIR}
# overrides only used when non-empty strings
@@ -192,10 +202,14 @@ if(WITH_BUILDINFO)
-P ${CMAKE_SOURCE_DIR}/build_files/cmake/buildinfo.cmake)
# buildinfo.h is a generated file
- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/buildinfo.h
+ set_source_files_properties(
+ ${buildinfo_h_real}
PROPERTIES GENERATED TRUE
HEADER_FILE_ONLY TRUE)
+ unset(buildinfo_h_real)
+ unset(buildinfo_h_fake)
+
# add deps below, after adding blender
# -------------- done with header values.
@@ -338,6 +352,8 @@ if(WITH_PYTHON)
DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
DESTINATION ${TARGETDIR_VER}
PATTERN ".git" EXCLUDE
+ PATTERN ".gitignore" EXCLUDE
+ PATTERN ".arcconfig" EXCLUDE
PATTERN "__pycache__" EXCLUDE
PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE
PATTERN "${FREESTYLE_EXCLUDE_CONDITIONAL}" EXCLUDE
@@ -538,6 +554,7 @@ if(UNIX AND NOT APPLE)
DIRECTORY ${PYTHON_LIBPATH}/python${PYTHON_VERSION}
DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}
PATTERN "__pycache__" EXCLUDE # * any cache *
+ PATTERN "config-${PYTHON_VERSION}m/*.a" EXCLUDE # static lib
PATTERN "lib2to3" EXCLUDE # ./lib2to3
PATTERN "site-packages/*" EXCLUDE # ./site-packages/*
PATTERN "tkinter" EXCLUDE # ./tkinter
@@ -914,6 +931,7 @@ elseif(APPLE)
PATTERN "__pycache__" EXCLUDE
PATTERN "__MACOSX" EXCLUDE
PATTERN ".DS_Store" EXCLUDE
+ PATTERN "config-${PYTHON_VERSION}m/*.a" EXCLUDE # static lib
)
endmacro()