build: Add Package maintainer note
This commit is contained in:
parent
a697a1a92e
commit
462e765ddc
3 changed files with 22 additions and 27 deletions
|
@ -16,9 +16,8 @@ SOAPYSDR="${SOAPYSDR:-AUTO}"
|
||||||
OPENSSL="${OPENSSL:-AUTO}"
|
OPENSSL="${OPENSSL:-AUTO}"
|
||||||
set -- -DENABLE_RTLSDR=$RTLSDR -DENABLE_SOAPYSDR=$SOAPYSDR -DENABLE_OPENSSL=$OPENSSL
|
set -- -DENABLE_RTLSDR=$RTLSDR -DENABLE_SOAPYSDR=$SOAPYSDR -DENABLE_OPENSSL=$OPENSSL
|
||||||
|
|
||||||
mkdir -p build
|
|
||||||
if [ -n "$CMAKE_TOOLCHAIN_FILE" ] ; then
|
if [ -n "$CMAKE_TOOLCHAIN_FILE" ] ; then
|
||||||
cmake $@ -DCMAKE_TOOLCHAIN_FILE=../$CMAKE_TOOLCHAIN_FILE -GNinja -B build
|
cmake $@ -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE -GNinja -B build
|
||||||
else
|
else
|
||||||
cmake $@ -GNinja -B build
|
cmake $@ -GNinja -B build
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -199,6 +199,7 @@ find_package(OpenSSL)
|
||||||
pkg_check_modules(PC_OPENSSL QUIET openssl)
|
pkg_check_modules(PC_OPENSSL QUIET openssl)
|
||||||
if(PC_OPENSSL_FOUND AND NOT WIN32)
|
if(PC_OPENSSL_FOUND AND NOT WIN32)
|
||||||
set(OPENSSL_LIBRARIES ${PC_OPENSSL_LINK_LIBRARIES})
|
set(OPENSSL_LIBRARIES ${PC_OPENSSL_LINK_LIBRARIES})
|
||||||
|
message(STATUS "Using OpenSSL: ${OPENSSL_LIBRARIES}")
|
||||||
endif()
|
endif()
|
||||||
if(OPENSSL_FOUND)
|
if(OPENSSL_FOUND)
|
||||||
message(STATUS "OpenSSL TLS support will be compiled. Found version ${OPENSSL_VERSION}")
|
message(STATUS "OpenSSL TLS support will be compiled. Found version ${OPENSSL_VERSION}")
|
||||||
|
|
|
@ -75,28 +75,19 @@ Get the `rtl_433` git repository if needed:
|
||||||
Installation using CMake and Make (commonly available):
|
Installation using CMake and Make (commonly available):
|
||||||
|
|
||||||
cd rtl_433/
|
cd rtl_433/
|
||||||
mkdir build
|
cmake -B build
|
||||||
cd build
|
cmake --build build --target install
|
||||||
cmake ..
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
|
|
||||||
Installation using CMake and Ninja (newer and faster):
|
Installation using CMake and Ninja (newer and faster):
|
||||||
|
|
||||||
cd rtl_433/
|
cd rtl_433/
|
||||||
mkdir build
|
cmake -DFORCE_COLORED_BUILD:BOOL=ON -GNinja -B build
|
||||||
cd build
|
cmake --build build -j 4
|
||||||
cmake -DFORCE_COLORED_BUILD:BOOL=ON -GNinja ..
|
cmake --build build --target install
|
||||||
cmake --build . -j 4
|
|
||||||
cmake --build . -- install
|
|
||||||
|
|
||||||
If installing to a global prefix (e.g. the default `/usr/local`) then instead run `make install` with privileges, .i.e.
|
If installing to a global prefix (e.g. the default `/usr/local`) then instead run `make install` with privileges, .i.e.
|
||||||
|
|
||||||
sudo make install
|
sudo cmake --build build --target install
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
sudo cmake --build . -- install
|
|
||||||
|
|
||||||
Use CMake with `-DENABLE_SOAPYSDR=ON` (default: `AUTO`) to require SoapySDR (e.g. with Debian needs the package `libsoapysdr-dev`), use `-DENABLE_RTLSDR=OFF` (default: `ON`) to disable RTL-SDR if needed.
|
Use CMake with `-DENABLE_SOAPYSDR=ON` (default: `AUTO`) to require SoapySDR (e.g. with Debian needs the package `libsoapysdr-dev`), use `-DENABLE_RTLSDR=OFF` (default: `ON`) to disable RTL-SDR if needed.
|
||||||
E.g. use:
|
E.g. use:
|
||||||
|
@ -109,6 +100,14 @@ Purge all SoapySDR packages and source installation from /usr/local.
|
||||||
Then install only from packages (version 0.7) or only from source (version 0.8).
|
Then install only from packages (version 0.7) or only from source (version 0.8).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
## Package maintainers
|
||||||
|
|
||||||
|
To properly configure builds without relying on automatic feature detection you should set all options explicitly, e.g.
|
||||||
|
|
||||||
|
cmake -DENABLE_RTLSDR=ON -DENABLE_SOAPYSDR=ON -DENABLE_OPENSSL=ON -DBUILD_DOCUMENTATION=OFF -DCMAKE_BUILD_TYPE=Release -GNinja -B build
|
||||||
|
cmake --build build -j 10
|
||||||
|
DESTDIR=/tmp/destdir cmake --build build --target install
|
||||||
|
|
||||||
## Windows
|
## Windows
|
||||||
|
|
||||||
### Visual Studio 2017
|
### Visual Studio 2017
|
||||||
|
@ -136,10 +135,8 @@ To start a build use in the menu e.g. "CMake" > "Build all"
|
||||||
Or build at the Command Prompt without opening Visual Studio. Clone rtl_433 sources, then
|
Or build at the Command Prompt without opening Visual Studio. Clone rtl_433 sources, then
|
||||||
|
|
||||||
cd rtl_433
|
cd rtl_433
|
||||||
mkdir build
|
cmake -G "Visual Studio 15 2017 Win64" -B build
|
||||||
cd build
|
cmake --build build
|
||||||
cmake -G "Visual Studio 15 2017 Win64" ..
|
|
||||||
cmake --build .
|
|
||||||
|
|
||||||
### MinGW-w64
|
### MinGW-w64
|
||||||
|
|
||||||
|
@ -194,15 +191,13 @@ SET(Threads_FOUND TRUE)
|
||||||
```
|
```
|
||||||
|
|
||||||
* open a MinGW terminal in the librtlsdr folder
|
* open a MinGW terminal in the librtlsdr folder
|
||||||
* create build folder and go into it: `mkdir build && cd build`
|
* generate makefiles for MinGW: `cmake -G "MinGW Makefiles" -B build`
|
||||||
* generate makefiles for MinGW: `cmake -G "MinGW Makefiles" ..`
|
* build the librtlsdr library: `cmake --build build`
|
||||||
* build the librtlsdr library: `mingw32-make`
|
|
||||||
|
|
||||||
#### rtl_433
|
#### rtl_433
|
||||||
|
|
||||||
* clone the rtl_433 repository and cd into it
|
* clone the rtl_433 repository and cd into it
|
||||||
* create a build folder and go into it: `mkdir build && cd build`
|
* run `cmake -G "MinGW Makefiles" -B build` in the build directory
|
||||||
* run `cmake -G "MinGW Makefiles" .. ` in the build directory
|
|
||||||
* run cmake-gui (this is easiest)
|
* run cmake-gui (this is easiest)
|
||||||
* set the source (the rtl_433 source code directory) and the build directory (one might create a build directory in the source directory)
|
* set the source (the rtl_433 source code directory) and the build directory (one might create a build directory in the source directory)
|
||||||
* click configure
|
* click configure
|
||||||
|
@ -211,7 +206,7 @@ SET(Threads_FOUND TRUE)
|
||||||
* point the `LIBRTLSDR_INCLUDE_DIRS` to the include folder of the librtlsdr source
|
* point the `LIBRTLSDR_INCLUDE_DIRS` to the include folder of the librtlsdr source
|
||||||
* point the `LIBRTLSDR_LIBRARIES` to the `librtlsdr.dll.a` file in the <librtlsdr_source>/build/src folder
|
* point the `LIBRTLSDR_LIBRARIES` to the `librtlsdr.dll.a` file in the <librtlsdr_source>/build/src folder
|
||||||
* that's the one you've built earlier
|
* that's the one you've built earlier
|
||||||
* start a MinGW terminal and run `mingw32-make` to build
|
* start a MinGW terminal and run `cmake --build build` to build
|
||||||
* when something in the tests folder doesn't build, you can disable it by commenting out `add_subdirectory(tests)` in the CMakeLists.txt file in the source folder of rtl_433
|
* when something in the tests folder doesn't build, you can disable it by commenting out `add_subdirectory(tests)` in the CMakeLists.txt file in the source folder of rtl_433
|
||||||
* rtl_433.exe should be built now
|
* rtl_433.exe should be built now
|
||||||
* you need to place it in the same folder as librtlsdr.dll and libusb-1.0.dll (you should have seen both of them by now)
|
* you need to place it in the same folder as librtlsdr.dll and libusb-1.0.dll (you should have seen both of them by now)
|
||||||
|
|
Loading…
Add table
Reference in a new issue