[Bf-blender-cvs] [2385fda448a] master: CMake: Allow specifying custom LIBDIR on Unix

Sergey Sharybin noreply at git.blender.org
Wed Aug 29 16:30:17 CEST 2018


Commit: 2385fda448a49dcd57acd8b9eae600846212a642
Author: Sergey Sharybin
Date:   Wed Aug 29 16:15:54 2018 +0200
Branches: master
https://developer.blender.org/rB2385fda448a49dcd57acd8b9eae600846212a642

CMake: Allow specifying custom LIBDIR on Unix

Works similar to how maxOS deals with this.

===================================================================

M	build_files/cmake/platform/platform_unix.cmake

===================================================================

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}/*)



More information about the Bf-blender-cvs mailing list