summaryrefslogtreecommitdiff
path: root/px/packages/cpp.scm
diff options
context:
space:
mode:
authorFranz Geffke <m@f-a.nz>2025-06-20 23:44:41 +0100
committerFranz Geffke <m@f-a.nz>2025-06-20 23:44:41 +0100
commit64b3266f0b844782b47c0f804f3b1df6a5dd39bc (patch)
treeb89c3c09567b4c1ad199bd5331643e9654c201cf /px/packages/cpp.scm
parent69f1175a2422d14fed86de8b6a9e9035961e769c (diff)
px: cpp-webrtc: Fix source input path
Diffstat (limited to 'px/packages/cpp.scm')
-rw-r--r--px/packages/cpp.scm59
1 files changed, 57 insertions, 2 deletions
diff --git a/px/packages/cpp.scm b/px/packages/cpp.scm
index 223519a..b74a871 100644
--- a/px/packages/cpp.scm
+++ b/px/packages/cpp.scm
@@ -74,7 +74,7 @@ in multiple languages.")
(source
(origin
(method url-fetch)
- (uri (string-append "https://source.pantherx.org/" name "_v" version ".tgz"))
+ (uri (string-append "https://source.pantherx.org/webrtc-cpp_v" version ".tgz"))
(sha256
(base32 "12k910nq20crkghvzb1pwil7iph2brqf94cfcc31px1nrzqv359w"))))
(build-system qt-build-system)
@@ -199,7 +199,62 @@ install(TARGETS webrtc-cpp-demo
(build-system cmake-build-system)
(arguments
`(#:tests? #f
- #:configure-flags '("-DCMAKE_BUILD_TYPE=Release")))
+ #:configure-flags '("-DCMAKE_BUILD_TYPE=Release"
+ "-DCMAKE_INSTALL_INCLUDEDIR=include"
+ "-DCMAKE_INSTALL_LIBDIR=lib")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install '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(Boost REQUIRED)
+find_dependency(OpenSSL REQUIRED)
+
+# Define the library targets
+add_library(sioclient::sioclient STATIC IMPORTED)
+set_target_properties(sioclient::sioclient PROPERTIES
+ IMPORTED_LOCATION \"${CMAKE_CURRENT_LIST_DIR}/../../libsioclient.a\"
+ INTERFACE_INCLUDE_DIRECTORIES \"${CMAKE_CURRENT_LIST_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 \"${CMAKE_CURRENT_LIST_DIR}/../../libsioclient_tls.a\"
+ INTERFACE_INCLUDE_DIRECTORIES \"${CMAKE_CURRENT_LIST_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
openssl