remove remote_console
This commit is contained in:
141
CMakeLists.txt
141
CMakeLists.txt
@@ -40,6 +40,7 @@ set(PIP_UTILS 1)
|
||||
if(LIBPROJECT)
|
||||
set(PIP_UTILS ${UTILS})
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED 1)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
|
||||
@@ -86,6 +87,19 @@ set(HDRS)
|
||||
set(PHDRS)
|
||||
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)
|
||||
include(DownloadGTest)
|
||||
set(PIP_CONCURRENT_TEST "lib/concurrent/test")
|
||||
@@ -97,11 +111,11 @@ endif()
|
||||
|
||||
if(STATIC_LIB)
|
||||
set(PIP_LIB_TYPE STATIC)
|
||||
set(PIP_LIB_TYPE_MSG "Static")
|
||||
add_definitions(-DPIP_STATIC_DEFINE)
|
||||
#message(STATUS "Building PIP static library")
|
||||
else()
|
||||
set(PIP_LIB_TYPE SHARED)
|
||||
#message(STATUS "Building PIP shared library")
|
||||
set(PIP_LIB_TYPE_MSG "Shared")
|
||||
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")
|
||||
endif()
|
||||
list(APPEND HDRS "${CMAKE_CURRENT_BINARY_DIR}/piversion.h")
|
||||
message(STATUS "Building PIP version ${PIP_VERSION} (${PIP_LIB_TYPE})")
|
||||
|
||||
if(MINGW)
|
||||
find_package(MinGW REQUIRED)
|
||||
@@ -174,7 +187,6 @@ endif()
|
||||
|
||||
# Compiler
|
||||
get_filename_component(C_COMPILER "${CMAKE_C_COMPILER}" NAME)
|
||||
#message("${C_COMPILER}")
|
||||
|
||||
|
||||
# Sources
|
||||
@@ -269,31 +281,27 @@ CHECK_FUNCTION_EXISTS(timer_delete PIP_TIMER_RT_2)
|
||||
|
||||
# Check if build debug version
|
||||
if (CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
set(PIP_BUILD_TYPE "Debug")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -Wall")
|
||||
add_definitions(-DPIP_DEBUG)
|
||||
message(STATUS "Building PIP debug version")
|
||||
else()
|
||||
set(PIP_BUILD_TYPE "Release")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall")
|
||||
message(STATUS "Building PIP release version")
|
||||
endif()
|
||||
|
||||
|
||||
# Check if std::iostream operators support
|
||||
if(STD_IOSTREAM)
|
||||
set(PIP_STD_IOSTREAM "yes")
|
||||
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()
|
||||
|
||||
|
||||
# Check if ICU used for PIString and PIChar
|
||||
if(ICU)
|
||||
message(STATUS "Building PIP with ICU")
|
||||
set(PIP_ICU "yes")
|
||||
add_definitions(-DPIP_ICU)
|
||||
list(APPEND LIBS_MAIN icuuc)
|
||||
else()
|
||||
message(STATUS "Building PIP without ICU")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -301,12 +309,9 @@ endif()
|
||||
set(_PIP_DEFS "")
|
||||
set(_PIP_DEFS_FILE "${CMAKE_CURRENT_BINARY_DIR}/pip_defs.h")
|
||||
if(INTROSPECTION)
|
||||
message(STATUS "Building PIP with introspection")
|
||||
message(STATUS "Warning: Introspection reduces the performance!")
|
||||
set(PIP_INTROSPECTION "yes")
|
||||
add_definitions(-DPIP_INTROSPECTION)
|
||||
set(_PIP_DEFS "PIP_INTROSPECTION")
|
||||
else()
|
||||
message(STATUS "Building PIP without introspection")
|
||||
endif()
|
||||
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)
|
||||
@@ -321,10 +326,10 @@ list(APPEND HDRS ${_PIP_DEFS_FILE})
|
||||
|
||||
# Check if RT timers exists
|
||||
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)
|
||||
message(STATUS "Building PIP with timers: Thread, ThreadRT, Pool")
|
||||
else()
|
||||
message(STATUS "Building PIP with timers: Thread, Pool")
|
||||
set(PIP_TIMERS "Thread, Pool")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -395,7 +400,7 @@ if (NOT CROSSTOOLS)
|
||||
# Check if USB is supported
|
||||
find_library(usb_FOUND usb SHARED)
|
||||
if(usb_FOUND)
|
||||
message(STATUS "Building PIP with USB support")
|
||||
set(PIP_USB "yes")
|
||||
import_version(pip_usb pip)
|
||||
set_deploy_property(pip_usb ${PIP_LIB_TYPE}
|
||||
LABEL "PIP usb support"
|
||||
@@ -408,8 +413,6 @@ if (NOT CROSSTOOLS)
|
||||
target_link_libraries(pip_usb pip ${usb_FOUND})
|
||||
list(APPEND LIBS_STATUS usb)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_usb)
|
||||
else()
|
||||
message(STATUS "Building PIP without USB support")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -429,7 +432,9 @@ if (NOT CROSSTOOLS)
|
||||
# Check if PIP support cryptographic encryption/decryption using sodium library
|
||||
find_library(sodium_FOUND sodium)
|
||||
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)
|
||||
set_deploy_property(pip_crypt ${PIP_LIB_TYPE}
|
||||
LABEL "PIP crypt support"
|
||||
@@ -442,15 +447,13 @@ if (NOT CROSSTOOLS)
|
||||
target_link_libraries(pip_crypt pip ${sodium_FOUND})
|
||||
list(APPEND LIBS_STATUS sodium)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
||||
else()
|
||||
message(STATUS "Building PIP without crypt support")
|
||||
endif()
|
||||
|
||||
|
||||
# Check if PIP support compress/decompress using zlib library
|
||||
find_library(zlib_FOUND NAMES z zlib)
|
||||
if(zlib_FOUND)
|
||||
message(STATUS "Building PIP with zlib compress support")
|
||||
set(PIP_COMPRESS "yes")
|
||||
import_version(pip_compress pip)
|
||||
set_deploy_property(pip_compress ${PIP_LIB_TYPE}
|
||||
LABEL "PIP compression support"
|
||||
@@ -463,8 +466,6 @@ if (NOT CROSSTOOLS)
|
||||
target_link_libraries(pip_compress pip ${zlib_FOUND})
|
||||
list(APPEND LIBS_STATUS zlib)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_compress)
|
||||
else()
|
||||
message(STATUS "Building PIP without compress support")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -487,7 +488,6 @@ if (NOT CROSSTOOLS)
|
||||
if(${FFTW_CLN}_FOUND)
|
||||
list(APPEND FFTW_LIBS "${FFTW_CLN}")
|
||||
list(APPEND FFTW_ABS_LIBS "${${FFTW_CLN}_FOUND}")
|
||||
#message(STATUS "PIFFTW found ${FFTW_CLN} = ${${FFTW_CLN}_FOUND}")
|
||||
set(${FFTW_CLN}_CTS "${FFTW_CLN}")
|
||||
if(${FFTW_CLNT}_FOUND)
|
||||
list(APPEND FFTW_LIBS "${FFTW_CLNT}")
|
||||
@@ -503,13 +503,12 @@ if (NOT CROSSTOOLS)
|
||||
else()
|
||||
message(STATUS "Warning: PIFFTW${FFTW_S_}::preparePlan was not threadsafe")
|
||||
endif()
|
||||
#message(STATUS "${FFTW_CLN} -> ${${FFTW_CLN}_TSFE}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
if(FFTW_LIBS)
|
||||
message(STATUS "Building PIP with fftw3 support: ${FFTW_LIBS}")
|
||||
set(PIP_FFTW "yes (${FFTW_LIBS})")
|
||||
import_version(pip_fftw pip)
|
||||
set_deploy_property(pip_fftw ${PIP_LIB_TYPE}
|
||||
LABEL "PIP FFTW support"
|
||||
@@ -521,15 +520,13 @@ if (NOT CROSSTOOLS)
|
||||
target_link_libraries(pip_fftw pip ${FFTW_ABS_LIBS})
|
||||
list(APPEND LIBS_STATUS ${FFTW_LIBS})
|
||||
list(APPEND PIP_LIBS_TARGETS pip_fftw)
|
||||
else()
|
||||
message(STATUS "Building PIP without fftw3 support")
|
||||
endif()
|
||||
|
||||
|
||||
# Check if PIP support OpenCL
|
||||
find_package(OpenCL QUIET)
|
||||
if(OpenCL_FOUND)
|
||||
message(STATUS "Building PIP with OpenCL support")
|
||||
set(PIP_OPENCL "yes (${OpenCL_VERSION_STRING})")
|
||||
import_version(pip_opencl pip)
|
||||
set_deploy_property(pip_opencl ${PIP_LIB_TYPE}
|
||||
LABEL "PIP OpenCL support"
|
||||
@@ -554,8 +551,6 @@ if (NOT CROSSTOOLS)
|
||||
list(APPEND LIBS_STATUS OpenCL)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_opencl)
|
||||
set(OpenCL_FOUND ${OpenCL_LIBRARIES})
|
||||
else()
|
||||
message(STATUS "Building PIP without OpenCL support")
|
||||
endif()
|
||||
|
||||
|
||||
@@ -570,10 +565,7 @@ if (NOT CROSSTOOLS)
|
||||
make_rc(pip_io_utils _RC)
|
||||
add_library(pip_io_utils ${PIP_LIB_TYPE} ${CPP_LIB_IO_UTILS} ${_RC})
|
||||
if(sodium_FOUND)
|
||||
message(STATUS "Building PIP IO Utils library with crypt support")
|
||||
list(APPEND IO_UTILS_LIBS pip_crypt)
|
||||
else()
|
||||
message(STATUS "Building PIP IO Utils library without crypt support, attention!")
|
||||
endif()
|
||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
||||
@@ -604,7 +596,6 @@ if (NOT CROSSTOOLS)
|
||||
|
||||
# Build cloud library if crypt enabled
|
||||
if(sodium_FOUND)
|
||||
message(STATUS "Building PICloud support")
|
||||
import_version(pip_cloud pip)
|
||||
set_deploy_property(pip_cloud ${PIP_LIB_TYPE}
|
||||
LABEL "PIP cloud transport support"
|
||||
@@ -624,7 +615,7 @@ if (NOT CROSSTOOLS)
|
||||
endif()
|
||||
find_package(Lua QUIET)
|
||||
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)
|
||||
set_deploy_property(pip_lua ${PIP_LIB_TYPE}
|
||||
LABEL "PIP Lua support"
|
||||
@@ -638,8 +629,6 @@ if (NOT CROSSTOOLS)
|
||||
add_library(pip_lua ${PIP_LIB_TYPE} ${CPP_LIB_LUA} ${_RC})
|
||||
target_link_libraries(pip_lua pip ${LUA_LIBRARIES})
|
||||
list(APPEND PIP_LIBS_TARGETS pip_lua)
|
||||
else()
|
||||
message(STATUS "Building PIP without Lua support")
|
||||
endif()
|
||||
|
||||
# Test program
|
||||
@@ -653,18 +642,17 @@ if (NOT CROSSTOOLS)
|
||||
|
||||
else()
|
||||
|
||||
message(STATUS "Building PIP with crypt support")
|
||||
set(PIP_CRYPT "yes")
|
||||
set(PIP_COMPRESS "yes")
|
||||
add_definitions(-DPIP_CRYPT)
|
||||
add_library(pip_crypt ${PIP_LIB_TYPE} ${CPP_LIB_CRYPT})
|
||||
target_link_libraries(pip_crypt pip)
|
||||
list(APPEND PIP_LIBS_TARGETS pip_crypt)
|
||||
set(IO_UTILS_LIBS pip)
|
||||
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)
|
||||
target_link_libraries(pip_io_utils ${IO_UTILS_LIBS})
|
||||
list(APPEND PIP_LIBS_TARGETS pip_io_utils)
|
||||
message(STATUS "Building PIP with zlib compress support")
|
||||
add_definitions(-DPIP_COMPRESS)
|
||||
add_library(pip_compress ${PIP_LIB_TYPE} ${CPP_LIB_COMPRESS})
|
||||
target_link_libraries(pip_compress pip)
|
||||
@@ -696,7 +684,6 @@ if(LIB)
|
||||
file(COPY "${STDLIB}" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/utils/deploy_tool")
|
||||
endif()
|
||||
else()
|
||||
#message("${CMAKE_CURRENT_BINARY_DIR}/pip_export.h")
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pip_export.h DESTINATION include)
|
||||
endif()
|
||||
else()
|
||||
@@ -708,7 +695,6 @@ if(LIB)
|
||||
endif()
|
||||
install(TARGETS ${PIP_LIBS_TARGETS} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
endif()
|
||||
message(STATUS "Install ${PROJECT_NAME} to system \"${CMAKE_INSTALL_PREFIX}\"")
|
||||
file(GLOB CMAKES "cmake/*.cmake" "cmake/*.in" "cmake/android_debug.keystore")
|
||||
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
|
||||
else()
|
||||
@@ -723,7 +709,6 @@ else()
|
||||
if(HDR_DIRS)
|
||||
install(DIRECTORY ${HDR_DIRS} DESTINATION include/pip)
|
||||
endif()
|
||||
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -740,7 +725,6 @@ if(NOT PIP_FREERTOS)
|
||||
add_subdirectory("utils/deploy_tool")
|
||||
if(PIP_UTILS AND (NOT CROSSTOOLS))
|
||||
add_subdirectory("utils/system_test")
|
||||
add_subdirectory("utils/remote_console")
|
||||
add_subdirectory("utils/udp_file_transfer")
|
||||
if(sodium_FOUND)
|
||||
add_subdirectory("utils/system_daemon")
|
||||
@@ -753,20 +737,11 @@ endif()
|
||||
|
||||
|
||||
# Libraries messages
|
||||
message(STATUS "Building PIP modules: ${PIP_LIBS_TARGETS}")
|
||||
if(DEFINED LIBPROJECT)
|
||||
set(PIP_LIBS_TARGETS ${PIP_LIBS_TARGETS} PARENT_SCOPE)
|
||||
list(APPEND _ALL_TARGETS ${PIP_LIBS_TARGETS})
|
||||
set(_ALL_TARGETS ${_ALL_TARGETS} PARENT_SCOPE)
|
||||
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
|
||||
@@ -797,3 +772,53 @@ if ((NOT PIP_FREERTOS) AND (NOT CROSSTOOLS))
|
||||
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("-----------------------")
|
||||
|
||||
Reference in New Issue
Block a user