This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
88 lines (74 loc) · 2.67 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
IF(POLICY CMP0022)
CMAKE_POLICY(SET CMP0022 OLD)
ENDIF()
PROJECT(libgaminggear C)
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
# * Force gcc to generate single line error messages (used for eclipse cdt)
# * Play it save with lots of warning messages
# * Define GNU source for some extras
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmessage-length=0 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-type-limits -D_GNU_SOURCE")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -Wl,--as-needed")
ENDIF()
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGSEAL_ENABLE -DG_ERRORCHECK_MUTEXES -DG_ENABLE_DIAGNOSTIC")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules")
INCLUDE(INSTALL_LIBDIR)
INCLUDE(INSTALL_CMAKE_MODULESDIR)
INCLUDE(INSTALL_PKGCONFIGDIR)
IF(WITH_UHID)
FIND_PACKAGE(UHID REQUIRED)
ELSEIF(WITH_UINPUT)
FIND_PACKAGE(UINPUT REQUIRED)
ELSE()
FIND_PACKAGE(UHID)
IF(NOT UHID_FOUND)
FIND_PACKAGE(UINPUT)
IF(NOT UINPUT_FOUND)
MESSAGE(FATAL_ERROR "Neither uhid nor uinput was found")
ENDIF()
ENDIF()
ENDIF()
FIND_PACKAGE(CANBERRA REQUIRED)
FIND_PACKAGE(GMODULE2 REQUIRED)
FIND_PACKAGE(GTK REQUIRED)
FIND_PACKAGE(M REQUIRED)
FIND_PACKAGE(NOTIFY REQUIRED)
FIND_PACKAGE(SQLITE3 3.7)
FIND_LIBRARY(RT_LIBRARY rt)
IF(NOT GFX_PLUGIN_DIR)
SET(GFX_PLUGIN_DIR ${INSTALL_LIBDIR}/gaminggear_plugins)
ENDIF()
MESSAGE(STATUS "Installing gfx plugins in ${GFX_PLUGIN_DIR}")
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
@ONLY
)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
SET(V_MAJOR 0)
SET(V_MINOR 15)
SET(V_MICRO 1)
SET(TRANSLATION_LANGUAGES de en)
INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_BINARY_DIR}/include
${CANBERRA_INCLUDE_DIRS}
${GTK_INCLUDE_DIRS}
${M_INCLUDE_DIR}
${NOTIFY_INCLUDE_DIRS}
)
ADD_SUBDIRECTORY(configuration)
ADD_SUBDIRECTORY(gaminggearfxcontrol)
ADD_SUBDIRECTORY(gaminggearfxinfo)
ADD_SUBDIRECTORY(icons)
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(libgaminggear)
ADD_SUBDIRECTORY(libgaminggearfx)
ADD_SUBDIRECTORY(libgaminggearwidget)
ADD_SUBDIRECTORY(po)