diff options
author | fulup <fulup.arfoll@iot.bzh> | 2017-04-09 15:25:38 +0200 |
---|---|---|
committer | fulup <fulup.arfoll@iot.bzh> | 2017-04-09 15:25:38 +0200 |
commit | 110ce18498753385fb880704490c9d86807a471f (patch) | |
tree | 7256689a80cba0c42b387872b54aab3a6e99fcc3 | |
parent | 6e70aac6c9f02496978d3d02efb355d66fb36ceb (diff) |
Fixes make install destination dir and README
-rw-r--r-- | ALSA-afb/CMakeLists.txt | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | HAL-afb/HDA-intel/CMakeLists.txt | 2 | ||||
-rw-r--r-- | HighLevel-afb/CMakeLists.txt | 2 | ||||
-rw-r--r-- | README.md | 32 | ||||
-rw-r--r-- | etc/config.cmake | 2 |
6 files changed, 29 insertions, 19 deletions
diff --git a/ALSA-afb/CMakeLists.txt b/ALSA-afb/CMakeLists.txt index d7ace36..d36dd78 100644 --- a/ALSA-afb/CMakeLists.txt +++ b/ALSA-afb/CMakeLists.txt @@ -26,7 +26,7 @@ PROJECT_TARGET_ADD(alsa-afb) SET_TARGET_PROPERTIES(alsa-afb PROPERTIES PREFIX "" LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/export.map" - OUTPUT_NAME alsabinding + OUTPUT_NAME alsa-lowlevel-binding ) # Library dependencies (include updates automatically) @@ -37,5 +37,5 @@ PROJECT_TARGET_ADD(alsa-afb) # installation directory INSTALL(TARGETS alsa-afb - LIBRARY DESTINATION ${binding_install_dir}) + LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) diff --git a/CMakeLists.txt b/CMakeLists.txt index 90ecf5c..e9f63db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,12 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG) # set default include directories INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_DIRS}) +# If no install dir try to guest some smart default +if(NOT BINDINGS_INSTALL_DIR) + message (status "*** ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}") + set(BINDINGS_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}) +endif() + # Bindings to compile # -------------------- file(GLOB filelist "[A-z]*") diff --git a/HAL-afb/HDA-intel/CMakeLists.txt b/HAL-afb/HDA-intel/CMakeLists.txt index 26be621..57400b5 100644 --- a/HAL-afb/HDA-intel/CMakeLists.txt +++ b/HAL-afb/HDA-intel/CMakeLists.txt @@ -38,4 +38,4 @@ PROJECT_TARGET_ADD(hal-intel-hda) # installation directory INSTALL(TARGETS hal-intel-hda - LIBRARY DESTINATION ${binding_install_dir}) + LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) diff --git a/HighLevel-afb/CMakeLists.txt b/HighLevel-afb/CMakeLists.txt index de59686..6fe0929 100644 --- a/HighLevel-afb/CMakeLists.txt +++ b/HighLevel-afb/CMakeLists.txt @@ -37,4 +37,4 @@ PROJECT_TARGET_ADD(audio-afb) # installation directory INSTALL(TARGETS audio-afb - LIBRARY DESTINATION ${binding_install_dir}) + LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR}) @@ -29,19 +29,23 @@ AFB_daemon dependency on Standard Linux Distributions ``` # Might want to add following variables into ~/.bashrc - export CC=gcc-5; export CXX=g++-5 # if using gcc5 - echo 'export DEST=$HOME/opt' >>~/.bashrc - echo 'export LD_LIBRARY_PATH=$INSTALL_DIR/lib64:$INSTALL_DIR/lib' >>~/.bashrc - echo 'export LIBRARY_PATH=$INSTALL_DIR/lib64:$INSTALL_DIR/lib' >>~/.bashrc - echo 'export PKG_CONFIG_PATH=$INSTALL_DIR/lib64/pkgconfig:$INSTALL_DIR/lib/pkgconfig' >>~/.bashrc - echo 'export PATH=$INSTALL_DIR/bin:$PATH' >>~/.bashrc + echo "#---------- AGL options Start ---------" >>~/.bashrc + echo "# Object: AGL cmake option for binder/bindings" >>~/.bashrc + echo "# Date: `date`" >>~/.bashrc + echo 'export CC=gcc-5; export CXX=g++-5' >>~/.bashrc # if using gcc5 + echo 'export INSTALL_PREFIX=$HOME/opt' >>~/.bashrc + echo 'export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib64:$INSTALL_PREFIX/lib' >>~/.bashrc + echo 'export LIBRARY_PATH=$INSTALL_PREFIX/lib64:$INSTALL_PREFIX/lib' >>~/.bashrc + echo 'export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib64/pkgconfig:$INSTALL_PREFIX/lib/pkgconfig' >>~/.bashrc + echo 'export PATH=$INSTALL_PREFIX/bin:$PATH' >>~/.bashrc + echo "#---------- AGL options End ---------" >>~/.bashrc source ~/.bashrc # install AGL pached version of LibMicroHttpd wget http://iot.bzh/download/public/2016/appfw/libmicrohttpd-0.9.49-agl.tgz tar -xzf libmicrohttpd-0.9.49-agl.tgz cd libmicrohttpd-0.9.49-agl - ./configure --prefix=$INSTALL_DIR + ./configure --prefix=$INSTALL_PREFIX make make install-strip @@ -50,7 +54,7 @@ AFB_daemon dependency on Standard Linux Distributions # Warning: previous GCC options should be set before initial cmake (clean Build/*) cd app-framework-binder; mkdir build; cd build - cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .. + cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX .. make make install ``` @@ -58,22 +62,22 @@ AFB_daemon dependency on Standard Linux Distributions ``` # Compile binding -INSTALL_DIR=xxxx # default ./Install +source ~/.bashrc # or any other file where your have place your compilation preferences mkdir build cd build -cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR .. +cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX .. make make install # Start the binder # From Development Tree - mkdir $INSTALL_DIR/share/wssocks + mkdir $INSTALL_PREFIX/share/wssocks afb-daemon --verbose --token="" --ldpaths=./build --port=1234 --roothttp=./htdocs -# From $INSTALL_DIR - mkdir $INSTALL_DIR/share/wssocks - afb-daemon --verbose --token="" --ldpaths=$INSTALL_DIR/lib/audio --port=1234 --roothttp=$INSTALL_DIR/htdocs/audio-bindings +# From $INSTALL_PREFIX + mkdir $INSTALL_PREFIX/share/wssocks + afb-daemon --verbose --token="" --ldpaths=$INSTALL_PREFIX/lib/audio --port=1234 --roothttp=$INSTALL_PREFIX/htdocs/audio-bindings ``` # replace hd:XX with your own sound card ID ex: "hw:0", "hw:PCH", ... Start a browser on http://localhost:1234?devid=hw:XX diff --git a/etc/config.cmake b/etc/config.cmake index f8d11dc..ae27a86 100644 --- a/etc/config.cmake +++ b/etc/config.cmake @@ -55,7 +55,7 @@ # Install default destination # -------------------------------- - set(binding_install_dir ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}) + # set(BINDINGS_INSTALL_DIR DestinationPath ) # Print a helper message when every thing is finished # ---------------------------------------------------- |