diff --git a/CMakeLists.txt b/CMakeLists.txt index a0053f3..78bbd30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,30 +15,30 @@ set(CMAKE_PREFIX_PATH "/home/wolverindev/clib/qt/5.6.1/5.6/gcc_64/lib/cmake") set(LIBEVENT_PATH "${LIBRARY_PATH}/event/build/lib/") function(resolve_library VARIABLE FALLBACK PATHS) - set( _PATHS ${PATHS} ${ARGN} ) # Merge them together + set( _PATHS ${PATHS} ${ARGN} ) # Merge them together - foreach(PATH IN ITEMS ${_PATHS}) - message(STATUS "Try to use path ${PATH} for ${VARIABLE}") - if(EXISTS ${PATH}) - message(STATUS "Setting ${VARIABLE} to ${PATH}") - set(${VARIABLE} ${PATH} PARENT_SCOPE) - return() - endif() - endforeach() + foreach(PATH IN ITEMS ${_PATHS}) + message(STATUS "Try to use path ${PATH} for ${VARIABLE}") + if(EXISTS ${PATH}) + message(STATUS "Setting ${VARIABLE} to ${PATH}") + set(${VARIABLE} ${PATH} PARENT_SCOPE) + return() + endif() + endforeach() - if(FALLBACK) - message(WARNING "Failed to resolve library path for ${VARIABLE}. Using default ${VARIABLE}") - else() - message(FATAL_ERROR "Failed to find requited library. Variable: ${VARIABLE} Paths: ${_PATHS}") - endif() + if(FALLBACK) + message(WARNING "Failed to resolve library path for ${VARIABLE}. Using default ${VARIABLE}") + else() + message(FATAL_ERROR "Failed to find requited library. Variable: ${VARIABLE} Paths: ${_PATHS}") + endif() endfunction() if (NOT BUILD_OS_ARCH) - set(BUILD_OS_ARCH $ENV{BUILD_OS_ARCH}) + set(BUILD_OS_ARCH $ENV{BUILD_OS_ARCH}) endif () if (NOT BUILD_OS_ARCH) - set(BUILD_OS_ARCH $ENV{build_os_arch}) + set(BUILD_OS_ARCH $ENV{build_os_arch}) endif () resolve_library(LIBRARY_TOM_MATH OFF "${LIBRARY_PATH}/tommath/build/libtommathStatic.a") @@ -59,11 +59,11 @@ resolve_library(LIBRARY_PATH_NICE OFF "${LIBRARY_PATH}/libnice/lin message("Found libnice at ${LIBRARY_PATH_NICE}") if (EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/") - set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/") + set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/i386-linux-gnu/") elseif(EXISTS "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/") - set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/") + set(GLIBC_LIB_DIR "${LIBRARY_PATH}/glibc/linux_${BUILD_OS_ARCH}/lib/x86_64-linux-gnu/") else() - message(FATAL_ERROR "Failed to find glibc") + message(FATAL_ERROR "Failed to find glibc") endif () message("Found GLIBC lib dir at ${GLIBC_LIB_DIR}") set(LIBRARY_PATH_GLIBC "${GLIBC_LIB_DIR}/libgio-2.0.a;${GLIBC_LIB_DIR}/libgmodule-2.0.a;${GLIBC_LIB_DIR}/libglib-2.0.a;${GLIBC_LIB_DIR}/libgobject-2.0.a;${GLIBC_LIB_DIR}/libffi.a;resolv") diff --git a/shared b/shared index e4cdbf7..b85c519 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit e4cdbf7385906898cfe450b6a5ad8721f145ea92 +Subproject commit b85c51951cd01b3535b9dd782908d02cac8f1455