CMake: Allow specifying custom LIBDIR on Unix
Works similar to how maxOS deals with this.
This commit is contained in:
parent
b2c707747d
commit
2385fda448
@ -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}/*)
|
||||
|
Loading…
Reference in New Issue
Block a user