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)
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")
45 SET(RESOURCES resources.qrc)
47 # generation of version.cpp
49 ADD_CUSTOM_TARGET(Version
50 ${CMAKE_CURRENT_SOURCE_DIR}/makeversion ${CMAKE_CURRENT_SOURCE_DIR}
51 COMMENT "Checking version.cpp" VERBATIM)
52 SET_SOURCE_FILES_PROPERTIES(version.cpp PROPERTIES GENERATED TRUE)
53 SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES version.cpp)
54 # required when building out of source, so version.cpp finds headers
55 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
59 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
64 FIND_PACKAGE(lame REQUIRED)
65 INCLUDE_DIRECTORIES(${LAME_INCLUDE_DIR})
66 SET(LIBRARIES ${LIBRARIES} ${LAME_LIBRARY})
70 FIND_PACKAGE(id3 REQUIRED)
71 INCLUDE_DIRECTORIES(${ID3_INCLUDE_DIR})
72 SET(LIBRARIES ${LIBRARIES} ${ID3_LIBRARY})
76 FIND_PACKAGE(vorbisenc REQUIRED)
77 INCLUDE_DIRECTORIES(${VORBISENC_INCLUDE_DIR})
78 SET(LIBRARIES ${LIBRARIES} ${VORBISENC_LIBRARY})
82 SET(QT_USE_QTDBUS TRUE)
83 SET(QT_USE_QTNETWORK TRUE)
84 FIND_PACKAGE(Qt4 REQUIRED)
85 INCLUDE(${QT_USE_FILE})
86 SET(LIBRARIES ${LIBRARIES} ${QT_LIBRARIES})
87 QT4_WRAP_CPP(MOC_SOURCES ${MOC_HEADERS})
88 QT4_ADD_RESOURCES(RESOURCES_SOURCES ${RESOURCES})
89 SET(SOURCES ${SOURCES} ${MOC_SOURCES} ${RESOURCES_SOURCES})
93 ADD_EXECUTABLE(${TARGET} ${SOURCES})
94 TARGET_LINK_LIBRARIES(${TARGET} ${LIBRARIES})
95 ADD_DEPENDENCIES(${TARGET} Version)
99 INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin)
100 INSTALL(FILES skype-call-recorder.desktop DESTINATION share/applications)
101 INSTALL(FILES icon.png DESTINATION share/icons/hicolor/128x128/apps
102 RENAME skype-call-recorder.png)