remove remote_console
This commit is contained in:
141
CMakeLists.txt
141
CMakeLists.txt
@@ -40,6 +40,7 @@ set(PIP_UTILS 1)
|
|||||||
if(LIBPROJECT)
|
if(LIBPROJECT)
|
||||||
set(PIP_UTILS ${UTILS})
|
set(PIP_UTILS ${UTILS})
|
||||||
endif()
|
endif()
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED 1)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
|
||||||
@@ -86,6 +87,19 @@ set(HDRS)
|
|||||||
set(PHDRS)
|
set(PHDRS)
|
||||||
set(HDR_DIRS)
|
set(HDR_DIRS)
|
||||||
|
|
||||||
|
set(PIP_STD_IOSTREAM "no")
|
||||||
|
set(PIP_ICU "no")
|
||||||
|
set(PIP_INTROSPECTION "no")
|
||||||
|
set(PIP_USB "no")
|
||||||
|
set(PIP_CRYPT "no")
|
||||||
|
set(PIP_CLOUD "no")
|
||||||
|
set(PIP_COMPRESS "no")
|
||||||
|
set(PIP_FFTW "no")
|
||||||
|
set(PIP_OPENCL "no")
|
||||||
|
set(PIP_LUA "no")
|
||||||
|
set(PIP_IOUTILS "yes")
|
||||||
|
set(PIP_UTILS_LIST)
|
||||||
|
|
||||||
if (TESTS)
|
if (TESTS)
|
||||||
include(DownloadGTest)
|
include(DownloadGTest)
|
||||||
set(PIP_CONCURRENT_TEST "lib/concurrent/test")
|
set(PIP_CONCURRENT_TEST "lib/concurrent/test")
|
||||||
@@ -97,11 +111,11 @@ endif()
|
|||||||
|
|
||||||
if(STATIC_LIB)
|
if(STATIC_LIB)
|
||||||
set(PIP_LIB_TYPE STATIC)
|
set(PIP_LIB_TYPE STATIC)
|
||||||
|
set(PIP_LIB_TYPE_MSG "Static")
|
||||||
add_definitions(-DPIP_STATIC_DEFINE)
|
add_definitions(-DPIP_STATIC_DEFINE)
|
||||||
#message(STATUS "Building PIP static library")
|
|
||||||
else()
|
else()
|
||||||
set(PIP_LIB_TYPE SHARED)
|
set(PIP_LIB_TYPE SHARED)
|
||||||
#message(STATUS "Building PIP shared library")
|
set(PIP_LIB_TYPE_MSG "Shared")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -122,7 +136,6 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
|||||||
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/${PIP_SRC_MAIN}/piversion.h")
|
||||||
endif()
|
endif()
|
||||||
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/piversion.h")
|
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/piversion.h")
|
||||||
message(STATUS "Building PIP version ${PIP_VERSION} (${PIP_LIB_TYPE})")
|
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
find_package(MinGW REQUIRED)
|
find_package(MinGW REQUIRED)
|
||||||
@@ -174,7 +187,6 @@ endif()
|
|||||||
|
|
||||||
# Compiler
|
# Compiler
|
||||||
get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
||||||
#message("${C_COMPILER}")
|
|
||||||
|
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
@@ -269,31 +281,27 @@ CHECK_FUNCTION_EXISTS(timer_delete PIP_TIMER_RT_2)
|
|||||||
|
|
||||||
# Check if build debug version
|
# Check if build debug version
|
||||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
|
set(PIP_BUILD_TYPE "Debug")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -Wall")
|
||||||
add_definitions(-DPIP_DEBUG)
|
add_definitions(-DPIP_DEBUG)
|
||||||
message(STATUS "Building PIP debug version")
|
|
||||||
else()
|
else()
|
||||||
|
set(PIP_BUILD_TYPE "Release")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
||||||
message(STATUS "Building PIP release version")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if std::iostream operators support
|
# Check if std::iostream operators support
|
||||||
if(STD_IOSTREAM)
|
if(STD_IOSTREAM)
|
||||||
|
set(PIP_STD_IOSTREAM "yes")
|
||||||
add_definitions(-DPIP_STD_IOSTREAM)
|
add_definitions(-DPIP_STD_IOSTREAM)
|
||||||
message(STATUS "Building PIP with std iostream operators support")
|
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without std iostream operators support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if ICU used for PIString and PIChar
|
# Check if ICU used for PIString and PIChar
|
||||||
if(ICU)
|
if(ICU)
|
||||||
message(STATUS "Building PIP with ICU")
|
set(PIP_ICU "yes")
|
||||||
add_definitions(-DPIP_ICU)
|
add_definitions(-DPIP_ICU)
|
||||||
list(APPEND LIBS_MAIN icuuc)
|
list(APPEND LIBS_MAIN icuuc)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without ICU")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -301,12 +309,9 @@ endif()
|
|||||||
set(_PIP_DEFS "")
|
set(_PIP_DEFS "")
|
||||||
set(_PIP_DEFS_FILE "${CMAKE_CURRENT_BINARY_DIR}/pip_defs.h")
|
set(_PIP_DEFS_FILE "${CMAKE_CURRENT_BINARY_DIR}/pip_defs.h")
|
||||||
if(INTROSPECTION)
|
if(INTROSPECTION)
|
||||||
message(STATUS "Building PIP with introspection")
|
set(PIP_INTROSPECTION "yes")
|
||||||
message(STATUS "Warning: Introspection reduces the performance!")
|
|
||||||
add_definitions(-DPIP_INTROSPECTION)
|
add_definitions(-DPIP_INTROSPECTION)
|
||||||
set(_PIP_DEFS "PIP_INTROSPECTION")
|
set(_PIP_DEFS "PIP_INTROSPECTION")
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without introspection")
|
|
||||||
endif()
|
endif()
|
||||||
if ((NOT DEFINED _PIP_SAVED_DEFS) OR (NOT "x${_PIP_SAVED_DEFS}" STREQUAL "x${_PIP_DEFS}"))
|
if ((NOT DEFINED _PIP_SAVED_DEFS) OR (NOT "x${_PIP_SAVED_DEFS}" STREQUAL "x${_PIP_DEFS}"))
|
||||||
set(_PIP_SAVED_DEFS "${_PIP_DEFS}" CACHE STRING "pip_defs" FORCE)
|
set(_PIP_SAVED_DEFS "${_PIP_DEFS}" CACHE STRING "pip_defs" FORCE)
|
||||||
@@ -321,10 +326,10 @@ list(APPEND HDRS ${_PIP_DEFS_FILE})
|
|||||||
|
|
||||||
# Check if RT timers exists
|
# Check if RT timers exists
|
||||||
if(PIP_TIMER_RT_0 AND PIP_TIMER_RT_1 AND PIP_TIMER_RT_2)
|
if(PIP_TIMER_RT_0 AND PIP_TIMER_RT_1 AND PIP_TIMER_RT_2)
|
||||||
|
set(PIP_TIMERS "Thread, ThreadRT, Pool")
|
||||||
add_definitions(-DPIP_TIMER_RT)
|
add_definitions(-DPIP_TIMER_RT)
|
||||||
message(STATUS "Building PIP with timers: Thread, ThreadRT, Pool")
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "Building PIP with timers: Thread, Pool")
|
set(PIP_TIMERS "Thread, Pool")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -395,7 +400,7 @@ if (NOT CROSSTOOLS)
|
|||||||
# Check if USB is supported
|
# Check if USB is supported
|
||||||
find_library(usb_FOUND usb SHARED)
|
find_library(usb_FOUND usb SHARED)
|
||||||
if(usb_FOUND)
|
if(usb_FOUND)
|
||||||
message(STATUS "Building PIP with USB support")
|
set(PIP_USB "yes")
|
||||||
import_version(pip_usb pip)
|
import_version(pip_usb pip)
|
||||||
set_deploy_property(pip_usb ${PIP_LIB_TYPE}
|
set_deploy_property(pip_usb ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP usb support"
|
LABEL "PIP usb support"
|
||||||
@@ -408,8 +413,6 @@ if (NOT CROSSTOOLS)
|
|||||||
target_link_libraries(pip_usb pip ${usb_FOUND})
|
target_link_libraries(pip_usb pip ${usb_FOUND})
|
||||||
list(APPEND LIBS_STATUS usb)
|
list(APPEND LIBS_STATUS usb)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_usb)
|
list(APPEND PIP_LIBS_TARGETS pip_usb)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without USB support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -429,7 +432,9 @@ if (NOT CROSSTOOLS)
|
|||||||
# Check if PIP support cryptographic encryption/decryption using sodium library
|
# Check if PIP support cryptographic encryption/decryption using sodium library
|
||||||
find_library(sodium_FOUND sodium)
|
find_library(sodium_FOUND sodium)
|
||||||
if(sodium_FOUND)
|
if(sodium_FOUND)
|
||||||
message(STATUS "Building PIP with crypt support")
|
set(PIP_CRYPT "yes")
|
||||||
|
set(PIP_IOUTILS "yes (+crypt)")
|
||||||
|
set(PIP_CLOUD "yes")
|
||||||
import_version(pip_crypt pip)
|
import_version(pip_crypt pip)
|
||||||
set_deploy_property(pip_crypt ${PIP_LIB_TYPE}
|
set_deploy_property(pip_crypt ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP crypt support"
|
LABEL "PIP crypt support"
|
||||||
@@ -442,15 +447,13 @@ if (NOT CROSSTOOLS)
|
|||||||
target_link_libraries(pip_crypt pip ${sodium_FOUND})
|
target_link_libraries(pip_crypt pip ${sodium_FOUND})
|
||||||
list(APPEND LIBS_STATUS sodium)
|
list(APPEND LIBS_STATUS sodium)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without crypt support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if PIP support compress/decompress using zlib library
|
# Check if PIP support compress/decompress using zlib library
|
||||||
find_library(zlib_FOUND NAMES z zlib)
|
find_library(zlib_FOUND NAMES z zlib)
|
||||||
if(zlib_FOUND)
|
if(zlib_FOUND)
|
||||||
message(STATUS "Building PIP with zlib compress support")
|
set(PIP_COMPRESS "yes")
|
||||||
import_version(pip_compress pip)
|
import_version(pip_compress pip)
|
||||||
set_deploy_property(pip_compress ${PIP_LIB_TYPE}
|
set_deploy_property(pip_compress ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP compression support"
|
LABEL "PIP compression support"
|
||||||
@@ -463,8 +466,6 @@ if (NOT CROSSTOOLS)
|
|||||||
target_link_libraries(pip_compress pip ${zlib_FOUND})
|
target_link_libraries(pip_compress pip ${zlib_FOUND})
|
||||||
list(APPEND LIBS_STATUS zlib)
|
list(APPEND LIBS_STATUS zlib)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without compress support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -487,7 +488,6 @@ if (NOT CROSSTOOLS)
|
|||||||
if(${FFTW_CLN}_FOUND)
|
if(${FFTW_CLN}_FOUND)
|
||||||
list(APPEND FFTW_LIBS "${FFTW_CLN}")
|
list(APPEND FFTW_LIBS "${FFTW_CLN}")
|
||||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_FOUND}")
|
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_FOUND}")
|
||||||
#message(STATUS "PIFFTW found ${FFTW_CLN} = ${${FFTW_CLN}_FOUND}")
|
|
||||||
set(${FFTW_CLN}_CTS "${FFTW_CLN}")
|
set(${FFTW_CLN}_CTS "${FFTW_CLN}")
|
||||||
if(${FFTW_CLNT}_FOUND)
|
if(${FFTW_CLNT}_FOUND)
|
||||||
list(APPEND FFTW_LIBS "${FFTW_CLNT}")
|
list(APPEND FFTW_LIBS "${FFTW_CLNT}")
|
||||||
@@ -503,13 +503,12 @@ if (NOT CROSSTOOLS)
|
|||||||
else()
|
else()
|
||||||
message(STATUS "Warning: PIFFTW${FFTW_S_}::preparePlan was not threadsafe")
|
message(STATUS "Warning: PIFFTW${FFTW_S_}::preparePlan was not threadsafe")
|
||||||
endif()
|
endif()
|
||||||
#message(STATUS "${FFTW_CLN} -> ${${FFTW_CLN}_TSFE}")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
if(FFTW_LIBS)
|
if(FFTW_LIBS)
|
||||||
message(STATUS "Building PIP with fftw3 support: ${FFTW_LIBS}")
|
set(PIP_FFTW "yes (${FFTW_LIBS})")
|
||||||
import_version(pip_fftw pip)
|
import_version(pip_fftw pip)
|
||||||
set_deploy_property(pip_fftw ${PIP_LIB_TYPE}
|
set_deploy_property(pip_fftw ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP FFTW support"
|
LABEL "PIP FFTW support"
|
||||||
@@ -521,15 +520,13 @@ if (NOT CROSSTOOLS)
|
|||||||
target_link_libraries(pip_fftw pip ${FFTW_ABS_LIBS})
|
target_link_libraries(pip_fftw pip ${FFTW_ABS_LIBS})
|
||||||
list(APPEND LIBS_STATUS ${FFTW_LIBS})
|
list(APPEND LIBS_STATUS ${FFTW_LIBS})
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_fftw)
|
list(APPEND PIP_LIBS_TARGETS pip_fftw)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without fftw3 support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# Check if PIP support OpenCL
|
# Check if PIP support OpenCL
|
||||||
find_package(OpenCL QUIET)
|
find_package(OpenCL QUIET)
|
||||||
if(OpenCL_FOUND)
|
if(OpenCL_FOUND)
|
||||||
message(STATUS "Building PIP with OpenCL support")
|
set(PIP_OPENCL "yes (${OpenCL_VERSION_STRING})")
|
||||||
import_version(pip_opencl pip)
|
import_version(pip_opencl pip)
|
||||||
set_deploy_property(pip_opencl ${PIP_LIB_TYPE}
|
set_deploy_property(pip_opencl ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP OpenCL support"
|
LABEL "PIP OpenCL support"
|
||||||
@@ -554,8 +551,6 @@ if (NOT CROSSTOOLS)
|
|||||||
list(APPEND LIBS_STATUS OpenCL)
|
list(APPEND LIBS_STATUS OpenCL)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_opencl)
|
list(APPEND PIP_LIBS_TARGETS pip_opencl)
|
||||||
set(OpenCL_FOUND ${OpenCL_LIBRARIES})
|
set(OpenCL_FOUND ${OpenCL_LIBRARIES})
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without OpenCL support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@@ -570,10 +565,7 @@ if (NOT CROSSTOOLS)
|
|||||||
make_rc(pip_io_utils _RC)
|
make_rc(pip_io_utils _RC)
|
||||||
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS} ${_RC})
|
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS} ${_RC})
|
||||||
if(sodium_FOUND)
|
if(sodium_FOUND)
|
||||||
message(STATUS "Building PIP IO Utils library with crypt support")
|
|
||||||
list(APPEND IO_UTILS_LIBS pip_crypt)
|
list(APPEND IO_UTILS_LIBS pip_crypt)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP IO Utils library without crypt support, attention!")
|
|
||||||
endif()
|
endif()
|
||||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
||||||
@@ -604,7 +596,6 @@ if (NOT CROSSTOOLS)
|
|||||||
|
|
||||||
# Build cloud library if crypt enabled
|
# Build cloud library if crypt enabled
|
||||||
if(sodium_FOUND)
|
if(sodium_FOUND)
|
||||||
message(STATUS "Building PICloud support")
|
|
||||||
import_version(pip_cloud pip)
|
import_version(pip_cloud pip)
|
||||||
set_deploy_property(pip_cloud ${PIP_LIB_TYPE}
|
set_deploy_property(pip_cloud ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP cloud transport support"
|
LABEL "PIP cloud transport support"
|
||||||
@@ -624,7 +615,7 @@ if (NOT CROSSTOOLS)
|
|||||||
endif()
|
endif()
|
||||||
find_package(Lua QUIET)
|
find_package(Lua QUIET)
|
||||||
if (LUA_FOUND)
|
if (LUA_FOUND)
|
||||||
message(STATUS "Building PIP with Lua support: Lua ${LUA_VERSION_STRING}")
|
set(PIP_LUA "yes (${LUA_VERSION_STRING})")
|
||||||
import_version(pip_lua pip)
|
import_version(pip_lua pip)
|
||||||
set_deploy_property(pip_lua ${PIP_LIB_TYPE}
|
set_deploy_property(pip_lua ${PIP_LIB_TYPE}
|
||||||
LABEL "PIP Lua support"
|
LABEL "PIP Lua support"
|
||||||
@@ -638,8 +629,6 @@ if (NOT CROSSTOOLS)
|
|||||||
add_library(pip_lua ${PIP_LIB_TYPE} ${CPP_LIB_LUA} ${_RC})
|
add_library(pip_lua ${PIP_LIB_TYPE} ${CPP_LIB_LUA} ${_RC})
|
||||||
target_link_libraries(pip_lua pip ${LUA_LIBRARIES})
|
target_link_libraries(pip_lua pip ${LUA_LIBRARIES})
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_lua)
|
list(APPEND PIP_LIBS_TARGETS pip_lua)
|
||||||
else()
|
|
||||||
message(STATUS "Building PIP without Lua support")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Test program
|
# Test program
|
||||||
@@ -653,18 +642,17 @@ if (NOT CROSSTOOLS)
|
|||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
||||||
message(STATUS "Building PIP with crypt support")
|
set(PIP_CRYPT "yes")
|
||||||
|
set(PIP_COMPRESS "yes")
|
||||||
add_definitions(-DPIP_CRYPT)
|
add_definitions(-DPIP_CRYPT)
|
||||||
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT})
|
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT})
|
||||||
target_link_libraries(pip_crypt pip)
|
target_link_libraries(pip_crypt pip)
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
||||||
set(IO_UTILS_LIBS pip)
|
set(IO_UTILS_LIBS pip)
|
||||||
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS})
|
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS})
|
||||||
message(STATUS "Building PIP IO Utils library with crypt support")
|
|
||||||
list(APPEND IO_UTILS_LIBS pip_crypt)
|
list(APPEND IO_UTILS_LIBS pip_crypt)
|
||||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
||||||
message(STATUS "Building PIP with zlib compress support")
|
|
||||||
add_definitions(-DPIP_COMPRESS)
|
add_definitions(-DPIP_COMPRESS)
|
||||||
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS})
|
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS})
|
||||||
target_link_libraries(pip_compress pip)
|
target_link_libraries(pip_compress pip)
|
||||||
@@ -696,7 +684,6 @@ if(LIB)
|
|||||||
file(COPY "${STDLIB}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/utils/deploy_tool")
|
file(COPY "${STDLIB}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/utils/deploy_tool")
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
#message("${CMAKE_CURRENT_BINARY_DIR}/pip_export.h")
|
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pip_export.h DESTINATION include)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pip_export.h DESTINATION include)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
@@ -708,7 +695,6 @@ if(LIB)
|
|||||||
endif()
|
endif()
|
||||||
install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
|
||||||
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore")
|
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore")
|
||||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
else()
|
else()
|
||||||
@@ -723,7 +709,6 @@ else()
|
|||||||
if(HDR_DIRS)
|
if(HDR_DIRS)
|
||||||
install(DIRECTORY ${HDR_DIRS} DESTINATION include/pip)
|
install(DIRECTORY ${HDR_DIRS} DESTINATION include/pip)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -740,7 +725,6 @@ if(NOT PIP_FREERTOS)
|
|||||||
add_subdirectory("utils/deploy_tool")
|
add_subdirectory("utils/deploy_tool")
|
||||||
if(PIP_UTILS AND (NOT CROSSTOOLS))
|
if(PIP_UTILS AND (NOT CROSSTOOLS))
|
||||||
add_subdirectory("utils/system_test")
|
add_subdirectory("utils/system_test")
|
||||||
add_subdirectory("utils/remote_console")
|
|
||||||
add_subdirectory("utils/udp_file_transfer")
|
add_subdirectory("utils/udp_file_transfer")
|
||||||
if(sodium_FOUND)
|
if(sodium_FOUND)
|
||||||
add_subdirectory("utils/system_daemon")
|
add_subdirectory("utils/system_daemon")
|
||||||
@@ -753,20 +737,11 @@ endif()
|
|||||||
|
|
||||||
|
|
||||||
# Libraries messages
|
# Libraries messages
|
||||||
message(STATUS "Building PIP modules: ${PIP_LIBS_TARGETS}")
|
|
||||||
if(DEFINED LIBPROJECT)
|
if(DEFINED LIBPROJECT)
|
||||||
set(PIP_LIBS_TARGETS ${PIP_LIBS_TARGETS} PARENT_SCOPE)
|
set(PIP_LIBS_TARGETS ${PIP_LIBS_TARGETS} PARENT_SCOPE)
|
||||||
list(APPEND _ALL_TARGETS ${PIP_LIBS_TARGETS})
|
list(APPEND _ALL_TARGETS ${PIP_LIBS_TARGETS})
|
||||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
if(NOT PIP_FREERTOS)
|
|
||||||
foreach(LIB_ ${LIBS_STATUS})
|
|
||||||
message(STATUS "Library ${LIB_} -> " ${${LIB_}_FOUND})
|
|
||||||
if(NOT ${LIB_}_FOUND)
|
|
||||||
message(WARNING "Library ${LIB_} not found, please install it")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build Documentation
|
# Build Documentation
|
||||||
@@ -797,3 +772,53 @@ if ((NOT PIP_FREERTOS) AND (NOT CROSSTOOLS))
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message("----------PIP----------")
|
||||||
|
message(" Version: ${PIP_VERSION} ")
|
||||||
|
message(" Linkage: ${PIP_LIB_TYPE_MSG}")
|
||||||
|
message(" Type : ${PIP_BUILD_TYPE}")
|
||||||
|
if(LIB)
|
||||||
|
message(" Install: \"${CMAKE_INSTALL_PREFIX}\"")
|
||||||
|
else()
|
||||||
|
if(NOT PIP_FREERTOS)
|
||||||
|
message(" Install: local \"bin\", \"lib\" and \"include\"")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
message("")
|
||||||
|
message(" Options:")
|
||||||
|
message(" std::iostream: ${PIP_STD_IOSTREAM}")
|
||||||
|
message(" ICU strings : ${PIP_ICU}")
|
||||||
|
message(" Timer types : ${PIP_TIMERS}")
|
||||||
|
message(" Introspection: ${PIP_INTROSPECTION}")
|
||||||
|
if(INTROSPECTION)
|
||||||
|
message(STATUS " Warning: Introspection reduces the performance!")
|
||||||
|
endif()
|
||||||
|
message("")
|
||||||
|
message(" Modules:")
|
||||||
|
message(" USB : ${PIP_USB}")
|
||||||
|
message(" Console : yes")
|
||||||
|
message(" Crypt : ${PIP_CRYPT}")
|
||||||
|
message(" Compress : ${PIP_COMPRESS}")
|
||||||
|
message(" FFTW : ${PIP_FFTW}")
|
||||||
|
message(" OpenCL : ${PIP_OPENCL}")
|
||||||
|
message(" IOUtils : ${PIP_IOUTILS}")
|
||||||
|
message(" Concurrent: yes")
|
||||||
|
message(" Cloud : ${PIP_CLOUD}")
|
||||||
|
message(" Lua : ${PIP_LUA}")
|
||||||
|
message("")
|
||||||
|
message(" Utilites:")
|
||||||
|
foreach(_util ${PIP_UTILS_LIST})
|
||||||
|
message(" * ${_util}")
|
||||||
|
endforeach()
|
||||||
|
if(NOT PIP_FREERTOS)
|
||||||
|
message("")
|
||||||
|
message(" Using libraries:")
|
||||||
|
foreach(LIB_ ${LIBS_STATUS})
|
||||||
|
message(" ${LIB_} -> " ${${LIB_}_FOUND})
|
||||||
|
if(NOT ${LIB_}_FOUND)
|
||||||
|
message(" ${LIB_} not found, may fail")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
message("-----------------------")
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ Also create imported targets:
|
|||||||
* PIP::USB
|
* PIP::USB
|
||||||
* PIP::Console
|
* PIP::Console
|
||||||
* PIP::Crypt
|
* PIP::Crypt
|
||||||
* PIP::FFTW
|
|
||||||
* PIP::Compress
|
* PIP::Compress
|
||||||
|
* PIP::FFTW
|
||||||
|
* PIP::OpenCL
|
||||||
* PIP::IOUtils
|
* PIP::IOUtils
|
||||||
* PIP::Concurrent
|
* PIP::Concurrent
|
||||||
* PIP::Cloud
|
* PIP::Cloud
|
||||||
@@ -64,6 +65,7 @@ find_library(PIP_CONSOLE_LIBRARY pip_console${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
|||||||
find_library(PIP_CRYPT_LIBRARY pip_crypt${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
find_library(PIP_CRYPT_LIBRARY pip_crypt${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
||||||
find_library(PIP_FFTW_LIBRARY pip_fftw${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
find_library(PIP_FFTW_LIBRARY pip_fftw${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
||||||
find_library(PIP_COMPRESS_LIBRARY pip_compress${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
find_library(PIP_COMPRESS_LIBRARY pip_compress${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
||||||
|
find_library(PIP_OPENCL_LIBRARY pip_opencl${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
||||||
find_library(PIP_IO_UTILS_LIBRARY pip_io_utils${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
find_library(PIP_IO_UTILS_LIBRARY pip_io_utils${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
||||||
find_library(PIP_CONCURRENT_LIBRARY pip_concurrent${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
find_library(PIP_CONCURRENT_LIBRARY pip_concurrent${_pip_suffix} HINTS ${_PIP_LIBDIR})
|
||||||
find_library(PIP_CLOUD_LIBRARY pip_cloud HINTS${_pip_suffix} ${_PIP_LIBDIR})
|
find_library(PIP_CLOUD_LIBRARY pip_cloud HINTS${_pip_suffix} ${_PIP_LIBDIR})
|
||||||
@@ -138,6 +140,7 @@ set(__module_Console "${PIP_CONSOLE_LIBRARY}" )
|
|||||||
set(__module_Crypt "${PIP_CRYPT_LIBRARY}" )
|
set(__module_Crypt "${PIP_CRYPT_LIBRARY}" )
|
||||||
set(__module_FFTW "${PIP_FFTW_LIBRARY}" )
|
set(__module_FFTW "${PIP_FFTW_LIBRARY}" )
|
||||||
set(__module_Compress "${PIP_COMPRESS_LIBRARY}" )
|
set(__module_Compress "${PIP_COMPRESS_LIBRARY}" )
|
||||||
|
set(__module_OpenCL "${PIP_OPENCL_LIBRARY}" )
|
||||||
set(__module_IOUtils "${PIP_IO_UTILS_LIBRARY}" )
|
set(__module_IOUtils "${PIP_IO_UTILS_LIBRARY}" )
|
||||||
set(__module_Concurrent "${PIP_CONCURRENT_LIBRARY}")
|
set(__module_Concurrent "${PIP_CONCURRENT_LIBRARY}")
|
||||||
set(__module_Cloud "${PIP_CLOUD_LIBRARY}" )
|
set(__module_Cloud "${PIP_CLOUD_LIBRARY}" )
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building picloud")
|
list(APPEND PIP_UTILS_LIST "picloud")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
file(GLOB CPPS "*.cpp")
|
file(GLOB CPPS "*.cpp")
|
||||||
file(GLOB HDRS "*.h")
|
file(GLOB HDRS "*.h")
|
||||||
add_executable(picloud ${CPPS} ${HDRS})
|
add_executable(picloud ${CPPS} ${HDRS})
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building pip_cmg")
|
list(APPEND PIP_UTILS_LIST "pip_cmg")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
import_version(pip_cmg pip)
|
import_version(pip_cmg pip)
|
||||||
set_deploy_property(pip_cmg
|
set_deploy_property(pip_cmg
|
||||||
LABEL "PIP code model generator"
|
LABEL "PIP code model generator"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building picrypt")
|
list(APPEND PIP_UTILS_LIST "picrypt")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
add_executable(picrypt "main.cpp")
|
add_executable(picrypt "main.cpp")
|
||||||
target_link_libraries(picrypt pip pip_crypt)
|
target_link_libraries(picrypt pip pip_crypt)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building deploy_tool")
|
list(APPEND PIP_UTILS_LIST "deploy_tool")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
import_version(deploy_tool pip)
|
import_version(deploy_tool pip)
|
||||||
set_deploy_property(deploy_tool
|
set_deploy_property(deploy_tool
|
||||||
LABEL "PIP deploy tool"
|
LABEL "PIP deploy tool"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
message(STATUS "Building pip_remote_console")
|
|
||||||
add_executable(pip_remote_console "main.cpp")
|
|
||||||
target_link_libraries(pip_remote_console pip pip_console)
|
|
||||||
if (DEFINED LIB)
|
|
||||||
install(TARGETS pip_remote_console DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
|
||||||
endif ()
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
/*
|
|
||||||
PIP - Platform Independent Primitives
|
|
||||||
Remote console viewer
|
|
||||||
Ivan Pelipenko peri4ko@yandex.ru
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "pip.h"
|
|
||||||
|
|
||||||
void key_event(PIKbdListener::KeyEvent key, void * );
|
|
||||||
|
|
||||||
PIConsole console(false, key_event);
|
|
||||||
PIStringList as;
|
|
||||||
bool selected = false;
|
|
||||||
|
|
||||||
void key_event(PIKbdListener::KeyEvent key, void * ) {
|
|
||||||
if (key.key < '1' || key.key > '9') return;
|
|
||||||
int ind = key.key - '1';
|
|
||||||
if (ind < 0 || ind >= as.size_s()) return;
|
|
||||||
selected = true;
|
|
||||||
console.connectToServer(as[ind]);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
|
||||||
console.enableExitCapture();
|
|
||||||
console.listenServers();
|
|
||||||
while (!PIKbdListener::exiting) {
|
|
||||||
msleep(200);
|
|
||||||
if (selected) break;
|
|
||||||
console.clearScreen();
|
|
||||||
as = console.availableServers();
|
|
||||||
if (as.isEmpty()) {
|
|
||||||
piCout << "No servers are available!";
|
|
||||||
} else {
|
|
||||||
piCout << "Select one with numeric key:";
|
|
||||||
for (int i = 0; i < as.size_s(); ++i)
|
|
||||||
piCout << (i + 1) << as[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!selected) return 0;
|
|
||||||
piCout << "Connecting to" << console.selectedServer() << "...";
|
|
||||||
while (!PIKbdListener::exiting) {
|
|
||||||
msleep(20);
|
|
||||||
if (console.isConnected())
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (PIKbdListener::exiting)
|
|
||||||
return 0;
|
|
||||||
console.start();
|
|
||||||
console.waitForFinish();
|
|
||||||
};
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building pip_rc")
|
list(APPEND PIP_UTILS_LIST "pip_rc")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
import_version(pip_rc pip)
|
import_version(pip_rc pip)
|
||||||
set_deploy_property(pip_rc
|
set_deploy_property(pip_rc
|
||||||
LABEL "PIP resources compiler"
|
LABEL "PIP resources compiler"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building pisd")
|
list(APPEND PIP_UTILS_LIST "pisd")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
file(GLOB CPPS "*.cpp")
|
file(GLOB CPPS "*.cpp")
|
||||||
file(GLOB HDRS "*.h")
|
file(GLOB HDRS "*.h")
|
||||||
add_executable(pisd ${CPPS} ${HDRS})
|
add_executable(pisd ${CPPS} ${HDRS})
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building pip_system_test")
|
list(APPEND PIP_UTILS_LIST "pip_system_test")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
add_executable(pip_system_test "main.cpp")
|
add_executable(pip_system_test "main.cpp")
|
||||||
target_link_libraries(pip_system_test pip)
|
target_link_libraries(pip_system_test pip)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
message(STATUS "Building pift")
|
list(APPEND PIP_UTILS_LIST "pift")
|
||||||
|
set(PIP_UTILS_LIST ${PIP_UTILS_LIST} PARENT_SCOPE)
|
||||||
add_executable(pift "main.cpp")
|
add_executable(pift "main.cpp")
|
||||||
target_link_libraries(pift pip pip_console)
|
target_link_libraries(pift pip pip_console)
|
||||||
if (DEFINED LIB)
|
if (DEFINED LIB)
|
||||||
|
|||||||
Reference in New Issue
Block a user