forked from lyricat/Hotot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (42 loc) · 1.58 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
cmake_minimum_required(VERSION 2.6)
cmake_policy(SET CMP0002 OLD)
project(hotot NONE)
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
find_package(Gettext REQUIRED)
option(WITH_GTK "Enable GTK Version" On)
option(WITH_GIR "Use GIR as GTK Version" Off)
option(WITH_QT "Enable Qt Version" On)
option(WITH_KDE "Enable KDE4 integration for Qt" On)
option(WITH_CHROME "Enable Chrome Version" Off)
# uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
##################### GTK Version ######################
if (WITH_GTK)
FIND_PACKAGE(PythonLibrary REQUIRED)
if (NOT PYTHONLIBRARY_FOUND)
message(FATAL_ERROR "GTK Wrapper for Hotot need python")
endif (NOT PYTHONLIBRARY_FOUND)
INCLUDE(PythonMacros)
if (WITH_GIR)
add_subdirectory(hotot-gir)
else (WITH_GIR)
add_subdirectory(hotot)
endif (WITH_GIR)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/hotot.in ${CMAKE_CURRENT_BINARY_DIR}/scripts/hotot @ONLY)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/scripts/hotot DESTINATION bin )
endif (WITH_GTK)
##################### CHROME Version ######################
if (WITH_CHROME)
add_subdirectory(chrome)
endif (WITH_CHROME)
##################### Qt Version ######################
if (WITH_QT)
add_subdirectory(qt)
endif (WITH_QT)
add_subdirectory(po)
add_subdirectory(misc)