CMake first pass (#90)

* CMake first pass

* canbusload dep fix

* Add Eclipse Debug, and Android Studio generation examples

* travis additions

* Update .travis.yml

CMAKE_BUILT_TYPE typo fix

* add android ndk variants(less mips)
This commit is contained in:
Joel Winarske
2018-08-17 09:50:30 +02:00
committed by Marc Kleine-Budde
parent 47f2e7a180
commit 8a3e0453aa
4 changed files with 162 additions and 0 deletions
+11
View File
@@ -47,6 +47,17 @@ subsystem (aka SocketCAN):
* slcand : daemon for serial line CAN interface configuration
* slcanpty : creates a pty for applications using the slcan ASCII protocol
#### CMake Project Generator
* Place your build folder anywhere, passing CMake the path. Relative or absolute.
* Some examples using a build folder under the source tree root:
* Android : cmake -DCMAKE_TOOLCHAIN_FILE=/home/joel/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DANDROID_PLATFORM=android-21 -DANDROID_ABI=armeabi-v7a .. && make
* Android Studio : Copy repo under your project's "app" folder, add "add_subdirectory(can-utils)" to your CMakeLists.txt file after "cmake_minimum_required()". Generating project will build Debug/Release for all supported EABI types. ie. arm64-v8a, armeabi-v7a, x86, x86_64.
* Raspberry Pi : cmake -DCMAKE_TOOLCHAIN_FILE=/home/joel/rpi/tools/build/cmake/rpi.toolchain.cmake .. && make
* Linux : cmake -GNinja .. && ninja
* Linux Eclipse Photon (Debug) : CC=clang cmake -G"Eclipse CDT4 - Unix Makefiles" ../can-utils/ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_ECLIPSE_VERSION=4.8.0
* To override the base installation directory use: CMAKE_INSTALL_PREFIX
* ie. CC=clang cmake -DCMAKE_INSTALL_PREFIX=./out .. && make install
### Additional Information:
* [SocketCAN Documentation (Linux Kernel)](https://www.kernel.org/doc/Documentation/networking/can.txt)