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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-08-29 17:15:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-08-29 17:15:54 +0300
commit2385fda448a49dcd57acd8b9eae600846212a642 (patch)
treeb2482da1c14eac9179b70e63d149a5de7f7eff33 /build_files
parentb2c707747da9f930a05499e98874c35d9aee7193 (diff)
CMake: Allow specifying custom LIBDIR on Unix
Works similar to how maxOS deals with this.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/cmake/platform/platform_unix.cmake10
1 files changed, 7 insertions, 3 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index 43a06c67373..bc6ebeab97c 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -24,9 +24,13 @@
# Libraries configuration for any *nix system including Linux and Unix.
# Detect precompiled library directory
-set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
-string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
-set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
+if(NOT DEFINED LIBDIR)
+ set(LIBDIR_NAME ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
+ string(TOLOWER ${LIBDIR_NAME} LIBDIR_NAME)
+ set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_NAME})
+else()
+ message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
+endif()
if(EXISTS ${LIBDIR})
file(GLOB LIB_SUBDIRS ${LIBDIR}/*)