-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiles and places the static nanomsg lib files on compile
- Loading branch information
1 parent
1db6d0a
commit 0d9620e
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
#Check if libnanomsg-static.a file is already exists or not | ||
file="../OSlibs/linux/$(uname -m)/libnanomsg-static.a" | ||
if [ ! -f "$file" ] | ||
then | ||
echo "$0: File '${file}' not found." | ||
#Download nanomsg library 1.0 stable | ||
rm -rf nanomsgsrc | ||
git clone https://github.com/nanomsg/nanomsg.git nanomsgsrc | ||
|
||
#Create destination folder | ||
mkdir nanomsglib | ||
|
||
#Switch into nanomsgsrc folder | ||
cd nanomsgsrc | ||
|
||
#Create build directory and switch into it | ||
mkdir build && cd build | ||
|
||
#Compile | ||
cmake .. -DCMAKE_INSTALL_PREFIX=../../nanomsglib/ -DCMAKE_BUILD_TYPE=Debug -DNN_STATIC_LIB=1 | ||
cmake --build . | ||
ctest -C Debug . | ||
cmake --build . --target install | ||
|
||
cd ../.. | ||
pwd | ||
mkdir -p ../OSlibs/linux/$(uname -m)/ | ||
cp -av nanomsglib/lib/libnanomsg.a ../OSlibs/linux/$(uname -m)/libnanomsg-static.a | ||
fi | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters