From f94c43e48e6c335cd708d14c0709ef088e8a1a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 4 Apr 2020 20:35:36 +0800 Subject: Transition to CMake --- README.md | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1f2fe1d..1415803 100644 --- a/README.md +++ b/README.md @@ -12,31 +12,47 @@ $ cd qrtclient ## Configuring for various target hosts (with optional debugging) ```sh -$ qmake CONFIG+=debug -spec android-clang qrtclient.pro +$ mkdir build +$ cmake -DCMAKE_BUILD_TYPE=Debug .. ``` or ```sh -$ qmake CONFIG+=debug -spec linux-g++ qrtclient.pro +$ mkdir build-Android_arm64_v8a-Debug +$ cd build-Android_arm64_v8a-Debug +$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_arm64-v8a=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/Qt5.14.1/5.14.1/android -DANDROID_ABI=arm64-v8a -DCMAKE_CXX_STANDARD_LIBRARIES=/opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so .. ``` -or +and/or ```sh -$ qmake CONFIG+=debug -spec macx-clang qrtclient.pro +$ mkdir build-Android_armeabi_v7a-Debug +$ cd build-Android_armeabi_v7a-Debug +$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_armeabi_v7a=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/Qt5.14.1/5.14.1/android -DANDROID_ABI=armeabi-v7a -DCMAKE_CXX_STANDARD_LIBRARIES=/opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so .. ``` -or +and/or + +```sh +$ mkdir build-Android_x86-Debug +$ cd build-Android_x86-Debug +$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_x86=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/Qt5.14.1/5.14.1/android -DANDROID_ABI=x86 -DCMAKE_CXX_STANDARD_LIBRARIES=/opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so .. +``` + +and/or ```sh -$ qmake CONFIG+=debug -spec macx-ios-clang qrtclient.pro +$ mkdir build-Android_x86_64-Debug +$ cd build-Android_x86_64-Debug +$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH=/opt/Qt5.14.1/5.14.1/android -DANDROID_NATIVE_API_LEVEL=21 -DANDROID_BUILD_ABI_x86_64=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/opt/Qt5.14.1/5.14.1/android -DANDROID_ABI=x86_64 -DCMAKE_CXX_STANDARD_LIBRARIES=/opt/android-ndk/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so .. ``` -or so on. +and/or so on. -## Compiling and linking +## Compiling, linking, and installing ```sh $ make # -jN (with N an integer number of parallel tasks you allow your computer to run for compiling this) +$ sudo make install ``` -- cgit v1.2.3