Changeset View
Changeset View
Standalone View
Standalone View
build_files/cmake/platform/platform_unix.cmake
| Show All 16 Lines | |||||
| # The Original Code is Copyright (C) 2016, Blender Foundation | # The Original Code is Copyright (C) 2016, Blender Foundation | ||||
| # All rights reserved. | # All rights reserved. | ||||
| # ***** END GPL LICENSE BLOCK ***** | # ***** END GPL LICENSE BLOCK ***** | ||||
| # Libraries configuration for any *nix system including Linux and Unix. | # Libraries configuration for any *nix system including Linux and Unix. | ||||
| # Detect precompiled library directory | # Detect precompiled library directory | ||||
| if(NOT DEFINED LIBDIR) | if(NOT DEFINED LIBDIR) | ||||
| # Path to a locally compiled libraries. | |||||
| set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}) | set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}) | ||||
| string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME) | string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME) | ||||
| set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME}) | set(LIBDIR_NATIVE_ABI ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME}) | ||||
| else() | |||||
| message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}") | # Path to precompiled libraries with known CentOS 7 ABI. | ||||
| set(LIBDIR_CENTOS7_ABI ${CMAKE_SOURCE_DIR}/../lib/linux_centos7_x86_64) | |||||
| # Choose the best suitable libraries. | |||||
| if(EXISTS ${LIBDIR_NATIVE_ABI}) | |||||
| set(LIBDIR ${LIBDIR_NATIVE_ABI}) | |||||
| elseif(EXISTS ${LIBDIR_CENTOS7_ABI}) | |||||
| set(LIBDIR ${LIBDIR_CENTOS7_ABI}) | |||||
| set(WITH_CXX11_ABI OFF) | |||||
| endif() | |||||
| # Avoid namespace pollustion. | |||||
| unset(LIBDIR_NATIVE_ABI) | |||||
| unset(LIBDIR_CENTOS7_ABI) | |||||
| endif() | endif() | ||||
| if(EXISTS ${LIBDIR}) | if(EXISTS ${LIBDIR}) | ||||
| message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}") | |||||
| file(GLOB LIB_SUBDIRS ${LIBDIR}/*) | file(GLOB LIB_SUBDIRS ${LIBDIR}/*) | ||||
| # NOTE: Make sure "proper" compiled zlib comes first before the one | # NOTE: Make sure "proper" compiled zlib comes first before the one | ||||
| # which is a part of OpenCollada. They have different ABI, and we | # which is a part of OpenCollada. They have different ABI, and we | ||||
| # do need to use the official one. | # do need to use the official one. | ||||
| set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS}) | set(CMAKE_PREFIX_PATH ${LIBDIR}/zlib ${LIB_SUBDIRS}) | ||||
| set(WITH_STATIC_LIBS ON) | set(WITH_STATIC_LIBS ON) | ||||
| set(WITH_OPENMP_STATIC ON) | set(WITH_OPENMP_STATIC ON) | ||||
| endif() | endif() | ||||
| ▲ Show 20 Lines • Show All 447 Lines • Show Last 20 Lines | |||||