Remove old icon's XCF and add new icon's SVG
[skype-call-recorder.git] / CMakeLists.txt
blob836e834b15f1c961c5c30e90345b82f115d4bc39
2 # versions before 2.4.8 do not seem to know about Qt's DBus
3 CMAKE_MINIMUM_REQUIRED(VERSION 2.4.8 FATAL_ERROR)
5 PROJECT(skype-call-recorder)
6 SET(TARGET skype-call-recorder)
8 SET(CMAKE_BUILD_TYPE RELEASE)
9 #SET(CMAKE_BUILD_TYPE DEBUG)
11 # compiler flags
13 SET(CMAKE_CXX_FLAGS "-Wall -W -pipe -fno-rtti -fno-exceptions")
14 SET(CMAKE_CXX_FLAGS_DEBUG "-ggdb")
15 SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -s")
17 # sources
19 SET(SOURCES
20         call.cpp
21         common.cpp
22         gui.cpp
23         mp3writer.cpp
24         preferences.cpp
25         recorder.cpp
26         skype.cpp
27         trayicon.cpp
28         utils.cpp
29         version.cpp
30         wavewriter.cpp
31         writer.cpp
34 SET(MOC_HEADERS
35         call.h
36         gui.h
37         preferences.h
38         recorder.h
39         skype.h
40         smartwidgets.h
41         trayicon.h
44 SET(RESOURCES resources.qrc)
46 # generation of version.cpp
48 ADD_CUSTOM_TARGET(Version
49         ${CMAKE_CURRENT_SOURCE_DIR}/makeversion ${CMAKE_CURRENT_SOURCE_DIR}
50         COMMENT "Checking version.cpp" VERBATIM)
51 SET_SOURCE_FILES_PROPERTIES(version.cpp PROPERTIES GENERATED TRUE)
52 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version.cpp)
53 # required when building out of source, so version.cpp finds headers
54 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
56 # external libraries
58 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
59 SET(LIBRARIES)
61 # lame
63 FIND_PACKAGE(lame REQUIRED)
64 INCLUDE_DIRECTORIES(${LAME_INCLUDE_DIR})
65 SET(LIBRARIES ${LIBRARIES} ${LAME_LIBRARY})
67 # id3
69 FIND_PACKAGE(id3 REQUIRED)
70 INCLUDE_DIRECTORIES(${ID3_INCLUDE_DIR})
71 SET(LIBRARIES ${LIBRARIES} ${ID3_LIBRARY})
73 # Qt
75 SET(QT_USE_QTDBUS TRUE)
76 SET(QT_USE_QTNETWORK TRUE)
77 FIND_PACKAGE(Qt4 REQUIRED)
78 INCLUDE(${QT_USE_FILE})
79 SET(LIBRARIES ${LIBRARIES} ${QT_LIBRARIES})
80 QT4_WRAP_CPP(MOC_SOURCES ${MOC_HEADERS})
81 QT4_ADD_RESOURCES(RESOURCES_SOURCES ${RESOURCES})
82 SET(SOURCES ${SOURCES} ${MOC_SOURCES} ${RESOURCES_SOURCES})
84 # main target
86 ADD_EXECUTABLE(${TARGET} ${SOURCES})
87 TARGET_LINK_LIBRARIES(${TARGET} ${LIBRARIES})
88 ADD_DEPENDENCIES(${TARGET} Version)
90 # installation
92 INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin)