Normalize CMAKE_SYSTEM_NAME and platform dependent folder names

This commit is contained in:
Denis Glazachev 2020-05-15 00:40:27 +04:00
parent 38320e6444
commit b68664d332
14 changed files with 8 additions and 4 deletions

View File

@ -24,7 +24,9 @@ if (ENABLE_LDAP)
endif ()
if (NOT OPENLDAP_FOUND AND NOT MISSING_INTERNAL_LDAP_LIBRARY)
string (TOLOWER "${CMAKE_SYSTEM_NAME}" _system_name)
string (TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _system_processor)
if (
"${_system_processor}" STREQUAL "amd64" OR
"${_system_processor}" STREQUAL "x64"
@ -33,9 +35,9 @@ if (ENABLE_LDAP)
endif ()
if (
( "${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" AND "${_system_processor}" STREQUAL "x86_64" ) OR
( "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD" AND "${_system_processor}" STREQUAL "x86_64" ) OR
( "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND "${_system_processor}" STREQUAL "x86_64" )
( "${_system_name}" STREQUAL "linux" AND "${_system_processor}" STREQUAL "x86_64" ) OR
( "${_system_name}" STREQUAL "freebsd" AND "${_system_processor}" STREQUAL "x86_64" ) OR
( "${_system_name}" STREQUAL "darwin" AND "${_system_processor}" STREQUAL "x86_64" )
)
set (_ldap_supported_platform TRUE)
endif ()

View File

@ -20,7 +20,9 @@ macro(mkversion _lib_name)
)
endmacro()
string(TOLOWER "${CMAKE_SYSTEM_NAME}" _system_name)
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _system_processor)
if(
"${_system_processor}" STREQUAL "amd64" OR
"${_system_processor}" STREQUAL "x64"
@ -28,7 +30,7 @@ if(
set(_system_processor "x86_64")
endif()
set(_extra_build_dir "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_SYSTEM_NAME}_${_system_processor}")
set(_extra_build_dir "${CMAKE_CURRENT_SOURCE_DIR}/${_system_name}_${_system_processor}")
set(_lber_srcs
${OPENLDAP_SOURCE_DIR}/libraries/liblber/assert.c