-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
46 lines (35 loc) · 1.03 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 3.0)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.14.29.tar.gz"
SHA1 "9c29c30fff99b7c1479b2e9d4926dcc3f8d364e0"
)
project(QtResourcesToIstream)
hunter_add_package(Qt)
find_package(Qt5Widgets REQUIRED)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(qtapp_sources main.cpp qtapp.qrc config.ini)
if(ANDROID)
add_library(qtapp SHARED ${qtapp_sources})
set_target_properties(qtapp PROPERTIES VERSION 1.0)
hunter_add_package(QtAndroidCMake)
list(APPEND CMAKE_MODULE_PATH "${QTANDROIDCMAKE_ROOT}")
include(AddQtAndroidApk) # add_qt_android_apk
add_qt_android_apk(
TARGET qtapp-apk
BASE_TARGET qtapp
PACKAGE_NAME com.github.forexample.qtresourcesistream
INSTALL
)
else()
add_executable(qtapp ${qtapp_sources})
endif()
add_library(foo foo.cpp foo.hpp)
target_link_libraries(qtapp PUBLIC Qt5::Widgets foo)
if(ANDROID OR IOS)
# Test manually
else()
enable_testing()
add_test(NAME QtRun COMMAND qtapp)
endif()