diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a2f84925ca4c28ac81c7d4d3c8b2e28103512d9..a797a7ce152adf1b42f34d3d40b306642e41c0ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,20 @@ find_package( URIParser REQUIRED ) find_package( MsgPack REQUIRED ) find_package( LibSGM ) +if (NOT WIN32) +find_library( READLINE_LIBRARY NAMES readline libreadline ) +if (NOT READLINE_LIBRARY) + message(FATAL "Readline library missing") +else() + message(STATUS "Found Readline: ${READLINE_LIBRARY}") +endif() +endif() + +find_program( NODE_NPM NAMES npm ) +if (NODE_NPM) + message(STATUS "Found NPM: ${NODE_NPM}") +endif() + # Why is this problematic on some machines? check_language(CUDA) if (CUDA_TOOLKIT_ROOT_DIR) @@ -77,7 +91,7 @@ if (WIN32) set(FTL_LOCAL_DATA_ROOT "\"$ENV{USERPROFILE}/AppData/ftl\"") add_definitions(-DWIN32) - set(CMAKE_CXX_FLAGS "/std:c++17") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -Wall") set(CMAKE_CXX_FLAGS_RELEASE "/O2") endif (WIN32) @@ -95,14 +109,14 @@ if (UNIX) set(FTL_GLOBAL_CACHE_ROOT "\"${CMAKE_INSTALL_PREFIX}/share/ftl\"") set(FTL_GLOBAL_DATA_ROOT "\"${CMAKE_INSTALL_PREFIX}/share/ftl\"") - set(CMAKE_CXX_FLAGS "-std=c++17") - set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -pg -Wall") - set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse3 -mfpmath=sse") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -pg -Wall") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse3 -mfpmath=sse") endif (UNIX) SET(CMAKE_USE_RELATIVE_PATHS ON) -add_subdirectory(net/cpp) +add_subdirectory(net) add_subdirectory(cv-node) configure_file(${CMAKE_SOURCE_DIR}/common/cpp/include/ftl/config.h.in diff --git a/net/README.md b/net/README.md index d563fc6abb9048af135cae6dc50f469cc5c98ab1..4c3deb62e21b8ab25902c478cb9616411a6097fd 100644 --- a/net/README.md +++ b/net/README.md @@ -9,4 +9,5 @@ Multiple protocols are supported, and it is intended that NAT traversal will be included. However, security, whether encryption or identification, is not considered presently. - +There are two supported languages: C++ and Javascript. See each respective +language folder for more details. diff --git a/net/js/package.json b/net/js/package.json index 1bc11f2ccf1c7cb37047ff69d7865f74d854bc2a..135148cc438deb4b5196d16a6435366c2a5a2bc9 100644 --- a/net/js/package.json +++ b/net/js/package.json @@ -10,7 +10,8 @@ "license": "ISC", "dependencies": { "struct": "0.0.12", - "uri-js": "^4.2.2" + "uri-js": "^4.2.2", + "ws": "^6.2.1" }, "devDependencies": { "mocha": "^6.0.2"