Giter VIP home page Giter VIP logo

inspect_cmake_multiplatform's Introduction

The UPnP Library

Under developement! Not usable at time. README.md only as draft, work in progress.

1. Overview

This is a fork of the Portable SDK for UPnP Devices (pupnp) with the aim of a complete re-engeneering based on UPnP™ Device Architecture 2.0. The following general goals are in progress or planned:

  • Drop in compatibillity with the old pupnp library
  • Continue optimization for embedded devices
  • Based on C++ instead of C
  • Object oriented programming
  • Unit-Test driven developement
  • Using CMake for managing the code
  • Focus on IPv6 support

2. Technical Documentation

Here you can find the Technical Documentation.\n If you want to be compatible with the classic pUPnP library here you find the [Compatible API](\ref compaAPI).\n To use the new written object oriented part of the library here you find its [UPnPlib API](\ref upnplibAPI).

3. Milestones

  • Ongoing: create extensive Unit Tests without modification of the old source code
  • Ongoing: define C++ interfaces for the API
  • Ongoing: change old C program to C++ objects but preserve drop in compatibility
  • Ongoing: support IP6
  • Ongoing: support OpenSSL

4. Build Instructions

If nothing others said we are always staying at the root directory of the project (CMAKE_SOURCE_DIR), that is upnplib_project/ if you don't changed the name.

4.1. Linux and MacOS build

First configure then build:

upnplib_project$ cmake -S . -B build -D UPNPLIB_WITH_SAMPLES=YES
upnplib_project$ cmake --build build

To clean up a build just delete the build folder:

upnplib_project$ rm -rf build

4.2. Microsoft Windows build

The developement of this UPnP Library has started on Linux. So for historical reasons it uses POSIX threads (pthreads) as specified by The Open Group. Unfortunately Microsoft Windows does not support it so I have to use a third party library. I use the well known and well supported pthreads4w library. It will be downloaded on Microsoft Windows and compiled with building the project and should do out of the box. To build the UPnPlib you need a Developer Command Prompt. How to install it is out of scope of this description. Microsoft has good documentation about it. For example this is the prompt I used:

**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.5
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

ingo@WIN10-DEVEL C:\Users\ingo> pwsh
PowerShell 7.4.1
PS C:\Users\ingo>

First configure then build:

PS C: upnplib_project> cmake -S . -B build -D UPNPLIB_WITH_SAMPLES=YES
PS C: upnplib_project> cmake --build build --config Release

After build don't forget to copy the needed ./build/_deps/pthreads4w-build/pthread*.dll library file to a location where your program can find it. Copying it to your programs directory or to the system directory Windows\System32 will always do. Within the project developement directory tree (default root upnplib_project/) built programs and libraries find its dll files. There is nothing to do.

To clean up a build just delete the build folder:

PS C: upnplib_project> rm -rf build

If you need more details about installation of POSIX threads on Microsoft Windows I have made an example at github pthreadsWinLin.

4.3 Googletest build

I strongly recommend to use shared gtest libraries for this project because there are situations where static and shared libraries are linked together. Using static linked Googletest libraries may fail then. If you know what you ar doing and you are able to manage possible linker errors you can try to use static built Googletest libraries.

# strongly recommended shared libs
upnplib_project$ cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -D UPNPLIB_WITH_GOOGLETEST=ON
upnplib_project$ cmake --build build --config Debug

# or alternative static libs
upnplib_project$ cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -D UPNPLIB_WITH_GOOGLETEST=ON -D GTESTS_WITH_SHARED_LIBS=OFF
upnplib_project$ cmake --build build --config Debug

Using build type "Debug" is not necessary for Googletest but it will enable additional debug messages from the library. if you don't need it you can just use "Release" instead of "Debug" above as option.

5. Limitations

No limits documented so far.


Copyright (C) 2021+ GPL 3 and higher by Ingo Höft, \
Redistribution only with this Copyright remark. Last modified: 2024-04-21

inspect_cmake_multiplatform's People

Contributors

ingo-h avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.