diff options
author | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-04-04 20:35:36 +0800 |
---|---|---|
committer | ꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id> | 2020-04-04 20:35:36 +0800 |
commit | f94c43e48e6c335cd708d14c0709ef088e8a1a2c (patch) | |
tree | 8933f2984b42467a53b067bb62f392c8246f38fb /CMakeLists.txt | |
parent | 7f0fbc63243884f5a3301f3c1af47ee4e38f5ed0 (diff) |
Transition to CMake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ff8be..26717b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,17 +1,47 @@ -cmake_minimum_required(VERSION 3.0.0) +cmake_minimum_required(VERSION 3.5) -project(qrtclient VERSION 0.1 LANGUAGES CXX) +project(qrtclient) set(CMAKE_AUTOMOC ON) find_package(Qt5Core) -add_library(${PROJECT_NAME} STATIC +add_library(${PROJECT_NAME} SHARED + ${PROJECT_NAME}/user.hxx + ${PROJECT_NAME}/ticket.hxx + ${PROJECT_NAME}/tickethistory.hxx + ${PROJECT_NAME}/client.hxx user.cxx ticket.cxx tickethistory.cxx client.cxx) -target_link_libraries(${PROJECT_NAME} Qt5::Core) +if (ANDROID) + if (ANDROID_ABI STREQUAL "arm64-v8a") + include_directories(/usr/local/aarch64-linux-android/sysroot/usr/include) + target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/aarch64-linux-android/sysroot/usr/lib) + elseif (ANDROID_ABI STREQUAL "armeabi-v7a") + include_directories(/usr/local/arm-linux-androideabi/sysroot/usr/include) + target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/arm-linux-androideabi/sysroot/usr/lib) + elseif (ANDROID_ABI STREQUAL "x86") + include_directories(/usr/local/i686-linux-android/sysroot/usr/include) + target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/i686-linux-android/sysroot/usr/lib) + elseif (ANDROID_ABI STREQUAL "x86_64") + include_directories(/usr/local/x86_64-linux-android/sysroot/usr/include) + target_link_directories(${PROJECT_NAME} PRIVATE /usr/local/x86_64-linux-android/sysroot/usr/lib) + endif() +endif() -include_directories(librtclient) +target_link_libraries(${PROJECT_NAME} + Qt5::Core + rtclient + ) + +install(TARGETS ${PROJECT_NAME} DESTINATION lib) +install(FILES + ${PROJECT_NAME}/user.hxx + ${PROJECT_NAME}/ticket.hxx + ${PROJECT_NAME}/tickethistory.hxx + ${PROJECT_NAME}/client.hxx + DESTINATION include/${PROJECT_NAME} + ) |