diff options
author | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2014-06-07 12:13:05 +0400 |
---|---|---|
committer | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2014-06-07 12:13:05 +0400 |
commit | e01449fa4bb0df252d32a3b98ee1e8f195923d96 (patch) | |
tree | 2d0745908702d5befcd460e8f7d330c88413762d /build_files/cmake | |
parent | 918f6a49a7c0fcef29800460202cad40eeec99b5 (diff) |
Fixes and workarounds for build problems: Windows 8.1, CMake 2.8.12.2, MSVC 2013
Cmake bug(?) workaround for zlib and png:
FindPNG.cmake calls find_package(zlib) and for some reason that redundant call
causes both zlib and png to not be found properly.
(Or, at least they complain, as this does not seem to cause a build error later)
Since zlib will be found by find_package(png),
it should be OK to not call find_package(zlib) explicitly.
Setting JPEG_NAME seems to be required by any version of MSVC, not just 9,
so changed check from MSVC09 to just MSVC
The proper Boost static libraries are not found unless the following variables are set:
set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
set(Boost_USE_MULTITHREADED ON) # suffix -mt
set(Boost_USE_STATIC_LIBS ON) # suffix -s
Note: The debug versions of the opencollada libraries are missing from windows_v12,
but this cannot be worked around (except to disable opencollada for debug builds)
because the value of _ITERATOR_DEBUG_LEVEL is different between opencollada and the
rest of Blender, so cannot just use the release versions with a debug build.
The fix would be to add the _d versions to the library directory.
Set /SAFESEH:NO to fix linker error related to libjpeg
(not sure why libjpeg is not compatible with this flag)
Also quiets warning about ignoring /EDITANDCONTINUE due to having /SAFESEH enabled
Some typos in buildinfo.cmake fixed.
In buildinfo.cmake, trying to determine if a branch is modified when it
has no upstream branch kills the build, so added ERROR_QUIET where upstream
check was done.
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/buildinfo.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/build_files/cmake/buildinfo.cmake b/build_files/cmake/buildinfo.cmake index c1d21c413dc..245d7472158 100644 --- a/build_files/cmake/buildinfo.cmake +++ b/build_files/cmake/buildinfo.cmake @@ -2,12 +2,12 @@ # ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h # Extract working copy information for SOURCE_DIR into MY_XXX variables -# with a default in case anything fails, for examble when using git-svn +# with a default in case anything fails, for example when using git-svn set(MY_WC_HASH "unknown") set(MY_WC_BRANCH "unknown") set(MY_WC_COMMIT_TIMESTAMP 0) -# Guess if this is a SVN working copy and then look up the revision +# Guess if this is a git working copy and then look up the revision if(EXISTS ${SOURCE_DIR}/.git) # The FindGit.cmake module is part of the standard distribution include(FindGit) @@ -60,7 +60,8 @@ if(EXISTS ${SOURCE_DIR}/.git) execute_process(COMMAND git log HEAD..@{u} WORKING_DIRECTORY ${SOURCE_DIR} OUTPUT_VARIABLE _git_below_check - OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET) if(NOT _git_below_check STREQUAL "") # If there're commits between HEAD and upstream this means # that we're reset-ed to older revision. Use it's hash then. @@ -106,7 +107,7 @@ if(EXISTS ${SOURCE_DIR}/.git) if(NOT _git_changed_files STREQUAL "") set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)") else() - # Unpushed commits are also considered local odifications + # Unpushed commits are also considered local modifications execute_process(COMMAND git log @{u}.. WORKING_DIRECTORY ${SOURCE_DIR} OUTPUT_VARIABLE _git_unpushed_log @@ -123,7 +124,7 @@ if(EXISTS ${SOURCE_DIR}/.git) endif() # BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake -# but BUILD_DATE and BUILD_TIME are plataform dependant +# but BUILD_DATE and BUILD_TIME are platform dependent if(UNIX) execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE) execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE) |