git-svn-id: svn://db.shs.com.ru/pip@915 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -6,8 +6,14 @@ set(PIP_BUILD 1)
|
||||
include(CheckFunctionExists)
|
||||
include(PIPMacros.cmake)
|
||||
|
||||
set(_ICU_DEFAULT OFF)
|
||||
if((NOT DEFINED WIN32) AND (NOT DEFINED ANDROID_PLATFORM) AND (NOT DEFINED APPLE))
|
||||
set(_ICU_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
|
||||
# Options
|
||||
option(ICU "ICU support for convert codepages" OFF)
|
||||
option(ICU "ICU support for convert codepages" ${_ICU_DEFAULT})
|
||||
option(STD_IOSTREAM "Building with std iostream operators support" OFF)
|
||||
option(INTROSPECTION "Build with introspection" OFF)
|
||||
option(LIB "System install" ON)
|
||||
@@ -43,7 +49,8 @@ set(PIP_SRC_FFTW "src_fftw")
|
||||
set(PIP_SRC_OPENCL "src_opencl")
|
||||
set(PIP_SRC_IO_UTILS "src_io_utils")
|
||||
set(PIP_SRC_CONCURRENT "src_concurrent")
|
||||
set(PIP_SRC_DIRS "src_main" "src_crypt" "src_compress" "src_usb" "src_fftw" "src_opencl" "src_io_utils" "src_concurrent")
|
||||
set(PIP_SRC_CLOUD "src_cloud")
|
||||
set(PIP_SRC_DIRS "src_main" "src_crypt" "src_compress" "src_usb" "src_fftw" "src_opencl" "src_io_utils" "src_concurrent" "src_cloud")
|
||||
set(PIP_LIBS_TARGETS pip)
|
||||
set(LIBS_MAIN)
|
||||
set(LIBS_STATUS)
|
||||
@@ -132,7 +139,7 @@ get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
||||
# Sources
|
||||
|
||||
# Main lib
|
||||
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent")
|
||||
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent" "cloud")
|
||||
if(PIP_FREERTOS)
|
||||
#list(REMOVE_ITEM PIP_FOLDERS "console")
|
||||
#include_directories("${PIP_SRC_MAIN}/console")
|
||||
@@ -167,6 +174,9 @@ gather_src("${PIP_SRC_CONCURRENT}" CPP_LIB_CONCURRENT HDRS PHDRS)
|
||||
|
||||
gather_src("${PIP_SRC_CONCURRENT_TEST}" CPP_CONCURRENT_TEST HDRS PHDRS)
|
||||
|
||||
# Cloud lib
|
||||
gather_src("${PIP_SRC_CLOUD}" CPP_LIB_CLOUD HDRS PHDRS)
|
||||
|
||||
if(PIP_FREERTOS)
|
||||
add_definitions(-DPIP_FREERTOS)
|
||||
set(ICU OFF)
|
||||
@@ -488,6 +498,7 @@ if (NOT PIP_FREERTOS)
|
||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
||||
|
||||
|
||||
# Concurrent module
|
||||
set(CONCURRENT_LIBS pip)
|
||||
add_library(pip_concurrent ${PIP_LIB_TYPE} ${CPP_LIB_CONCURRENT})
|
||||
@@ -503,6 +514,17 @@ if (NOT PIP_FREERTOS)
|
||||
add_custom_target(pip_concurrent_test_perform ALL COMMAND pip_concurrent_test)
|
||||
endif()
|
||||
|
||||
|
||||
# Build cloud library if crypt enabled
|
||||
if(sodium_FOUND)
|
||||
message(STATUS "Building PICloud support")
|
||||
add_definitions(-DPIP_CLOUD)
|
||||
add_library(pip_cloud ${PIP_LIB_TYPE} ${CPP_LIB_CLOUD})
|
||||
target_link_libraries(pip_cloud pip pip_crypt)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_cloud)
|
||||
endif()
|
||||
|
||||
|
||||
# Test program
|
||||
if(PIP_UTILS)
|
||||
add_executable(pip_test "main.cpp")
|
||||
@@ -581,6 +603,7 @@ if(NOT PIP_FREERTOS)
|
||||
if(sodium_FOUND)
|
||||
add_subdirectory("utils/system_daemon")
|
||||
add_subdirectory("utils/crypt_tool")
|
||||
add_subdirectory("utils/cloud_dispatcher")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user