-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
48 lines (35 loc) · 1.18 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.18)
project(qt5_platform_maemo)
message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}")
set(CMAKE_CXX_STANDARD 20)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")
include(FindCcache)
option(BUILD_EXAMPLE "Build the example application" OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
"Default build type: Release" FORCE)
endif()
find_package(PkgConfig REQUIRED)
# These 2 are needed because we include `hildon-im-protocol.h` for some enums
pkg_check_modules(GTK REQUIRED gtk+-2.0)
pkg_check_modules(HIM3 REQUIRED hildon-input-method-framework-3.0)
find_package(X11 REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(XCB REQUIRED xcb)
include_directories(${X11_INCLUDE_DIR})
link_directories(${X11_LIBRARIES})
# global compile defs
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(DEBUG=1)
endif()
# Qt
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui Network Xml X11Extras)
add_definitions(${QT_DEFINITIONS})
# targets
if(BUILD_EXAMPLE)
add_subdirectory(example)
endif()
add_subdirectory(plugin)