set (SLIB_BASE_PATH "${CMAKE_CURRENT_LIST_DIR}/..")

include_directories ("${SLIB_BASE_PATH}/include")

if(CMAKE_CXX_FLAGS MATCHES "-std=")
else ()
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -frtti")
if (CMAKE_BUILD_TYPE MATCHES Release)
 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
endif()

if (ANDROID)
 if(ANDROID_ABI MATCHES "armeabi")
  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -marm -mfpu=neon")
  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -marm -mfpu=neon")
  set (CMAKE_ASM_FLAGS, "${CMAKE_ASM_FLAGS} -marm -mfpu=neon")
 endif()
 link_directories ("${SLIB_BASE_PATH}/lib/Android/${CMAKE_BUILD_TYPE}-${ANDROID_ABI}")
else ()
 if (CMAKE_SYSTEM_NAME STREQUAL Linux)
  link_directories("${SLIB_BASE_PATH}/lib/Linux/${CMAKE_BUILD_TYPE}-${CMAKE_SYSTEM_PROCESSOR}")
 else()
  link_directories("${SLIB_BASE_PATH}/lib/CMake/${CMAKE_BUILD_TYPE}-${CMAKE_SYSTEM_PROCESSOR}")
 endif()
endif()
