-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (24 loc) · 1.01 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
cmake_minimum_required(VERSION 3.10)
project(aboawt)
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
message(FATAL_ERROR "This project is meant to be built on Android (Termux) / Linux, not on Windows or macOS!")
endif ()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++ -fPIC")
include_directories("include")
add_library(aboawt-global STATIC
src/Application/Definitions.cpp
src/Application/Utils.cpp
src/Swap/SwapManager.cpp
src/Application/Core.cpp
src/Android/BatteryManager.cpp
src/Android/Classpaths.cpp
src/CmdLine.cpp
src/Application/PkgMgr.cpp)
add_executable(aboawt src/main.cpp)
target_link_libraries(aboawt PRIVATE aboawt-global)
if (EXISTS "${CMAKE_SOURCE_DIR}/src/TestMain.cpp")
message("Creating testing executable")
add_executable(aboawt-test src/TestMain.cpp)
target_link_libraries(aboawt-test PRIVATE aboawt-global)
endif ()