File: CMakeLists.txt

package info (click to toggle)
fatrat-opensubtitles 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 176 kB
  • ctags: 47
  • sloc: cpp: 466; makefile: 6
file content (83 lines) | stat: -rw-r--r-- 2,232 bytes parent folder | download | duplicates (2)
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
project(fatrat-opensubtitles)

cmake_minimum_required(VERSION 2.4.0)
if(COMMAND cmake_policy)
	cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

find_package(Qt4 REQUIRED)

set(CMAKE_MODULE_PATH cmake_modules)

if(WITH_EVERYTHING)
	set(WITH_NLS ON)
endif(WITH_EVERYTHING)

set(QT_USE_QTNETWORK TRUE)
set(QT_USE_QTXML TRUE)

set(fatrat_DIR ${CMAKE_MODULE_PATH})
find_package(fatrat REQUIRED)

if(FATRAT_FOUND)
	message(STATUS "fatrat found OK")
	include_directories(${FATRAT_INCLUDE_DIRS})
else(FATRAT_FOUND)
	message(FATAL_ERROR "No FatRat development headers found")
endif(FATRAT_FOUND)

include( ${QT_USE_FILE} )
add_definitions(${QT_DEFINITIONS})
add_definitions(-fvisibility=hidden)

if(CMAKE_BUILD_TYPE MATCHES Debug)
	ADD_DEFINITIONS(-ggdb)
	ADD_DEFINITIONS(-DDEBUG)
	ADD_DEFINITIONS(-Wall)
endif(CMAKE_BUILD_TYPE MATCHES Debug)

include_directories(./ ${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR})
CONFIGURE_FILE(config.h.in config.h)

set(fatrat-opensubtitles_SRCS
	fr_opensubtitles.cpp
	SubtitlesDlg.cpp
	SettingsSubtitles.cpp
	)

set(fatrat-opensubtitles_MOC_HDRS
	SubtitlesDlg.h
	)

set(fatrat-opensubtitles_UIS
	SubtitlesDlg.ui
	SettingsSubtitles.ui
	)

qt4_wrap_cpp(fatrat-opensubtitles_MOC_SRCS ${fatrat-opensubtitles_MOC_HDRS})

set(fatrat-opensubtitles_RCS
	gfx/opensubtitles.qrc
)

qt4_wrap_ui(fatrat-opensubtitles_UIS_H ${fatrat-opensubtitles_UIS})
qt4_add_resources(fatrat-opensubtitles_QRC_H gfx/opensubtitles.qrc)
qt4_add_translation(lrelease_outputs locale/fatrat-opensubtitles_cs_CZ.ts locale/fatrat-opensubtitles_pl_PL.ts locale/fatrat-opensubtitles_sk_SK.ts locale/fatrat-opensubtitles_tr_TR.ts)

add_library(fatrat-opensubtitles SHARED ${fatrat-opensubtitles_SRCS} ${fatrat-opensubtitles_MOC_SRCS} ${fatrat-opensubtitles_UIS_H} ${fatrat-opensubtitles_QRC_H} ${lrelease_outputs})

target_link_libraries(fatrat-opensubtitles ${QT_LIBRARIES} -lz)

if(WITH_NLS)
	install(FILES ${lrelease_outputs} DESTINATION share/fatrat/lang)
endif(WITH_NLS)

install(TARGETS fatrat-opensubtitles DESTINATION lib/fatrat/plugins)

install(FILES
	DESTINATION share/fatrat/data/plugins/fatrat-opensubtitles
	)
install(FILES
	${CMAKE_CURRENT_SOURCE_DIR}/data/TRANSLATIONS
	DESTINATION share/doc/fatrat-opensubtitles
	)