Fix clean build

This commit is contained in:
Robin Davies
2021-08-23 21:26:53 -04:00
parent 849001de46
commit 264a32d3b2
6 changed files with 34 additions and 7 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.19.0) cmake_minimum_required(VERSION 3.16.0)
project(pipedal VERSION 0.1.0) project(pipedal VERSION 0.1.0)
include(CTest) include(CTest)
+14 -2
View File
@@ -80,10 +80,21 @@ PiPedal has only been tested on Raspbian. But we will gladly accept pull request
To build PiPedal, a Raspberry Pi 4B, with at least 4GB of memory is recommended. You should be able to cross-compile PiPedal easily enough, To build PiPedal, a Raspberry Pi 4B, with at least 4GB of memory is recommended. You should be able to cross-compile PiPedal easily enough,
but we do not currently provide support for this. Consult CMake documentation on how to cross-compile source. but we do not currently provide support for this. Consult CMake documentation on how to cross-compile source.
Run the following commands to install build tools required by the PiPedal build.
# install CMake
sudo apt update
sudo apt install cmake
# install NodeJS lastest LTS release.
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Run the following commands to install dependent components required by the PiPedal build. Run the following commands to install dependent components required by the PiPedal build.
sudo apt update sudo apt update
sudo apt install liblilv-dev libboost-dev libjack-jack2-dev sudo apt install liblilv-dev libboost-dev libjack-jackd2-dev libnl-3-dev libnl-genl-3-dev libboost-all-dev
The PiPedal build process also requires version 14 or later of `node.js`. Type `node --version` to see if you have a version The PiPedal build process also requires version 14 or later of `node.js`. Type `node --version` to see if you have a version
of `node.js` installed already. Otherwise run the following commands as root to install the v14.x lts version of `node.js`: of `node.js` installed already. Otherwise run the following commands as root to install the v14.x lts version of `node.js`:
@@ -91,6 +102,7 @@ of `node.js` installed already. Otherwise run the following commands as root to
curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
apt-get install -y nodejs apt-get install -y nodejs
### Building PiPedal ### Building PiPedal
PiPedal was developed using Visual Studio Code. If you open the PiPedal project as a folder in VS Code, Code will PiPedal was developed using Visual Studio Code. If you open the PiPedal project as a folder in VS Code, Code will
@@ -100,7 +112,7 @@ itself, build commands should appear on the bottom line of the Visual Studio Cod
To install PiPedal, run a full non-debug build using Visual Studio Code, and then run the following command To install PiPedal, run a full non-debug build using Visual Studio Code, and then run the following command
in the root project directory: in the root project directory:
sudo ./install sudo ./init
If you are using a different development environment, you can build the project by running the following If you are using a different development environment, you can build the project by running the following
command in the root project directory. command in the root project directory.
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/bash
# Configure cmake build.
echo Configuring cmake build...
mkdir build
cd build
cmake ..
cd ..
# Install react dependencies
cd react
npm install
cd ..
+2 -1
View File
@@ -1 +1,2 @@
cmake --build /build --config RelWithDebInfo --target all #!/usr/bin/bash
/usr/bin/cmake --build build --config RelWithDebInfo --target all
+1 -1
View File
@@ -7,7 +7,7 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
set(BUILD_REACT "echo") set(BUILD_REACT "echo")
set(BUILD_REACT_ARGS Skipping react debug build) set(BUILD_REACT_ARGS Skipping react debug build)
else() else()
set(BUILD_REACT ${NPM_COMMAND}) set(BUILD_REACT npm)
set(BUILD_REACT_ARGS run build) set(BUILD_REACT_ARGS run build)
endif() endif()
+2 -2
View File
@@ -1,5 +1,5 @@
set(VERBOSE true) set(VERBOSE true)
cmake_minimum_required(VERSION 3.19.0) cmake_minimum_required(VERSION 3.16.0)
include(FindPkgConfig) include(FindPkgConfig)
@@ -16,7 +16,7 @@ include(FindPkgConfig)
# nlgenl-3 library. # nlgenl-3 library.
execute_process(COMMAND ls /usr/include/libnl3/netlink/netlink.h RESULT_VARIABLE LNL3_MISSING OUTPUT_QUIET ERROR_QUIET) execute_process(COMMAND ls /usr/include/libnl3/netlink/netlink.h RESULT_VARIABLE LNL3_MISSING OUTPUT_QUIET ERROR_QUIET)
if(LNL3_MISSING) if(LNL3_MISSING)
message(ERROR " Need to: sudo apt get libnl-3-dev libnl-genl-3-dev ") message(ERROR " Need to: sudo apt install libnl-3-dev libnl-genl-3-dev ")
endif() endif()
set(LIBNL3_INCLUDE_DIRS /usr/include/libnl3) set(LIBNL3_INCLUDE_DIRS /usr/include/libnl3)
set(LIBNL3_LIBRARIES nl-3 nl-genl-3) set(LIBNL3_LIBRARIES nl-3 nl-genl-3)