diff options
author | Franz Geffke <m@f-a.nz> | 2025-06-22 01:13:16 +0100 |
---|---|---|
committer | Franz Geffke <m@f-a.nz> | 2025-06-22 01:13:16 +0100 |
commit | ebbed32983019bcf44da8e00efa1a2a4ce3f6b82 (patch) | |
tree | 13e1483e5841304247404560e21853f5d7393b5d /px/packages/cpp.scm | |
parent | 45858f4a304b0d7fc57aa866cfbd7a5af698cea4 (diff) |
px: cpp-socketio-client: Reverse changes and drop boost
Diffstat (limited to 'px/packages/cpp.scm')
-rw-r--r-- | px/packages/cpp.scm | 73 |
1 files changed, 2 insertions, 71 deletions
diff --git a/px/packages/cpp.scm b/px/packages/cpp.scm index 3a0d65a..9eea69e 100644 --- a/px/packages/cpp.scm +++ b/px/packages/cpp.scm @@ -17,7 +17,6 @@ #:use-module (gnu packages networking) ;; libnice #:use-module (gnu packages cpp) ;; cli11 #:use-module (gnu packages compression) ;; xz - #:use-module (gnu packages boost) ;; boost #:use-module (gnu packages web) ;; rapidjson, websocketpp #:use-module (gnu packages tls) ;; openssl #:use-module (gnu packages networking) ;; asio @@ -199,76 +198,8 @@ install(TARGETS webrtc-cpp-demo (build-system cmake-build-system) (arguments `(#:tests? #f - #:configure-flags '("-DCMAKE_BUILD_TYPE=Release" - "-DCMAKE_INSTALL_INCLUDEDIR=include" - "-DCMAKE_INSTALL_LIBDIR=lib") - #:phases - (modify-phases %standard-phases - (add-after 'install 'verify-tls-lib - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib"))) - ;; Check that both libraries were built and installed - (unless (file-exists? (string-append lib "/libsioclient.a")) - (error "libsioclient.a was not installed")) - (unless (file-exists? (string-append lib "/libsioclient_tls.a")) - (error "libsioclient_tls.a was not installed - OpenSSL may not be found during build")) - #t))) - (add-after 'verify-tls-lib 'install-cmake-config - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (lib (string-append out "/lib")) - (cmake-dir (string-append lib "/cmake/sioclient"))) - (mkdir-p cmake-dir) - ;; Create sioclientConfig.cmake - (call-with-output-file (string-append cmake-dir "/sioclientConfig.cmake") - (lambda (port) - (display "# sioclient CMake configuration file -include(CMakeFindDependencyMacro) - -# Find dependencies -find_dependency(OpenSSL REQUIRED) - -# Get the package prefix -get_filename_component(PACKAGE_PREFIX_DIR \"${CMAKE_CURRENT_LIST_DIR}/../../../\" ABSOLUTE) - -# Define the library targets -add_library(sioclient::sioclient STATIC IMPORTED) -set_target_properties(sioclient::sioclient PROPERTIES - IMPORTED_LOCATION \"${PACKAGE_PREFIX_DIR}/lib/libsioclient.a\" - INTERFACE_INCLUDE_DIRECTORIES \"${PACKAGE_PREFIX_DIR}/include\" - INTERFACE_COMPILE_DEFINITIONS \"ASIO_STANDALONE;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;_WEBSOCKETPP_CPP11_FUNCTIONAL_;_WEBSOCKETPP_CPP11_STL_\" -) - -add_library(sioclient::sioclient_tls STATIC IMPORTED) -set_target_properties(sioclient::sioclient_tls PROPERTIES - IMPORTED_LOCATION \"${PACKAGE_PREFIX_DIR}/lib/libsioclient_tls.a\" - INTERFACE_INCLUDE_DIRECTORIES \"${PACKAGE_PREFIX_DIR}/include\" - INTERFACE_COMPILE_DEFINITIONS \"ASIO_STANDALONE;BOOST_DATE_TIME_NO_LIB;BOOST_REGEX_NO_LIB;SIO_TLS;_WEBSOCKETPP_CPP11_FUNCTIONAL_;_WEBSOCKETPP_CPP11_STL_\" - INTERFACE_LINK_LIBRARIES \"OpenSSL::SSL;OpenSSL::Crypto\" -) - -# For compatibility, also provide the bare target names -add_library(sioclient ALIAS sioclient::sioclient) -add_library(sioclient_tls ALIAS sioclient::sioclient_tls) -" port))) - ;; Create sioclientConfigVersion.cmake - (call-with-output-file (string-append cmake-dir "/sioclientConfigVersion.cmake") - (lambda (port) - (display "set(PACKAGE_VERSION \"3.1.0\") - -if(\"${PACKAGE_VERSION}\" VERSION_LESS \"${PACKAGE_FIND_VERSION}\") - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if(\"${PACKAGE_VERSION}\" VERSION_EQUAL \"${PACKAGE_FIND_VERSION}\") - set(PACKAGE_VERSION_EXACT TRUE) - endif() -endif() -" port))) - #t)))))) - (inputs (list boost - rapidjson + #:configure-flags '("-DCMAKE_BUILD_TYPE=Release"))) + (inputs (list rapidjson openssl websocketpp asio)) |