-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
47 lines (39 loc) · 1.44 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
47
cmake_minimum_required(VERSION 3.12.0)
cmake_policy(SET CMP0048 NEW)
project(dependencyscanner VERSION 1.0.0)
include(GenerateExportHeader)
include(FetchContent)
FetchContent_Declare(
cli11
GIT_REPOSITORY https://github.com/CLIUtils/CLI11
GIT_TAG v2.2.0)
FetchContent_MakeAvailable(cli11)
set(CMAKE_CXX_STANDARD 20)
set(LIB_SOURCES
include/androiddependencyextractor.h
include/dependencyextractor.h
include/dependency.h
include/textutils.h
src/androiddependencyextractor.cpp
src/dependencyextractor.cpp
src/textutils.cpp)
set(ANDROID_TOOL_SRC src/check.cpp)
set(ANDROID_PLUGIN_TOOL_SRC src/qtpluginresolver.cpp)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
find_package(nlohmann_json 3.2.0 REQUIRED)
add_library(dependency_extractor ${LIB_SOURCES})
target_include_directories(dependency_extractor
PUBLIC include ${CMAKE_CURRENT_BINARY_DIR})
generate_export_header(dependency_extractor)
add_executable(qtandroiddependencyscanner ${ANDROID_TOOL_SRC})
add_executable(qtpluginresolver ${ANDROID_PLUGIN_TOOL_SRC})
target_link_libraries(dependency_extractor PRIVATE fmt::fmt spdlog::spdlog)
target_link_libraries(
qtandroiddependencyscanner
PRIVATE dependency_extractor fmt::fmt spdlog::spdlog CLI11::CLI11
nlohmann_json::nlohmann_json)
target_link_libraries(
qtpluginresolver
PRIVATE dependency_extractor fmt::fmt spdlog::spdlog CLI11::CLI11
nlohmann_json::nlohmann_json)