-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
31 lines (22 loc) · 859 Bytes
/
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
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(color_helper C)
cmake_policy(SET CMP0015 NEW)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GTK3 REQUIRED gtk+-3.0)
PKG_CHECK_MODULES(X11 REQUIRED x11)
PKG_CHECK_MODULES(XEXT REQUIRED xext)
INCLUDE_DIRECTORIES(${GTK3_INCLUDE_DIRS})
LINK_DIRECTORIES(${GTK3_LIBRARY_DIRS})
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
LINK_DIRECTORIES(${X11_LIBRARIES})
INCLUDE_DIRECTORIES(${X11_Xext_INCLUDE_PATH})
LINK_DIRECTORIES(${X11_Xext_LIB})
ADD_DEFINITIONS(${GTK3_CFLAGS_OTHER})
add_definitions(-DMAX_COLORS=5000)
FILE(GLOB MyCSources src/*.c)
ADD_EXECUTABLE(color_helper ${MyCSources})
FIND_LIBRARY(XEXT_LIBRARY Xext)
TARGET_LINK_LIBRARIES(color_helper ${GTK3_LIBRARIES})
TARGET_LINK_LIBRARIES(color_helper ${X11_LIBRARIES})
TARGET_LINK_LIBRARIES(color_helper ${XEXT_LIBRARY})
TARGET_LINK_LIBRARIES(color_helper m)