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")
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})
58 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules")
63 FIND_PACKAGE(lame REQUIRED)
64 INCLUDE_DIRECTORIES(${LAME_INCLUDE_DIR})
65 SET(LIBRARIES ${LIBRARIES} ${LAME_LIBRARY})
69 FIND_PACKAGE(id3 REQUIRED)
70 INCLUDE_DIRECTORIES(${ID3_INCLUDE_DIR})
71 SET(LIBRARIES ${LIBRARIES} ${ID3_LIBRARY})
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})
86 ADD_EXECUTABLE(${TARGET} ${SOURCES})
87 TARGET_LINK_LIBRARIES(${TARGET} ${LIBRARIES})
88 ADD_DEPENDENCIES(${TARGET} Version)
92 INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin)
93 INSTALL(FILES skype-call-recorder.desktop DESTINATION share/applications)
94 INSTALL(FILES icon.png DESTINATION share/icons/hicolor/128x128/apps
95 RENAME skype-call-recorder.png)