git-svn-id: svn://db.shs.com.ru/libs@532 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-04-23 09:54:35 +00:00
parent b80ba35992
commit f804ec5c83
6 changed files with 43 additions and 62 deletions

View File

@@ -32,7 +32,11 @@ if (DEFINED ANDROID_PLATFORM)
endif()
set(INSTALL_PREFIX "")
if(CMAKE_CROSSCOMPILING)
set(INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}/")
if (DEFINED ANDROID_PLATFORM)
set(INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}/")
else()
set(INSTALL_PREFIX "${CMAKE_STAGING_PREFIX}")
endif()
endif()
option(LIB "System install" 1)
option(DEBUG "Build with -g3" 0)
@@ -52,9 +56,11 @@ set(PIP_LIBRARY pip)
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt")
set(PIP_INCLUDES)
if (LIB)
if(LIB)
if(WIN32)
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
if(MINGW)
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
endif()
else()
if(APPLE)
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX}/usr/local)
@@ -62,7 +68,11 @@ if (LIB)
if (DEFINED ANDROID_PLATFORM)
set(CMAKE_INSTALL_PREFIX ${ANDROID_SYSTEM_LIBRARY_PATH}/usr)
else()
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX}/usr)
if(CMAKE_CROSSCOMPILING)
set(CMAKE_INSTALL_PREFIX ${CMAKE_STAGING_PREFIX})
else()
set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX}/usr)
endif()
endif()
endif()
endif()
@@ -75,7 +85,7 @@ foreach(F ${PIP_FOLDERS})
list(APPEND PIP_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/pip/src_main/${F}")
endforeach(F)
#message(${PIP_INCLUDES})
if(DEFINED ANDROID_PLATFORM)
if(CMAKE_CROSSCOMPILING OR (DEFINED ANDROID_PLATFORM))
set(PIP_CMG "pip_cmg")
set(PIP_RC "pip_rc")
else()