Merge branch 'master' into blender2.8
[blender.git] / build_files / cmake / platform / platform_unix.cmake
index 6313deb20c9e88fd294923dc2a6f10e13b4793a6..fc9e09b73fd79b871fdbeefe7eb7bef105cffbac 100644 (file)
 # 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}/*)