-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
executable file
·53 lines (47 loc) · 2.19 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
cmake_minimum_required (VERSION 2.6)
## Project setup
project (changeling)
set (changeling_VERSION_MAJOR 1)
set (changeling_VERSION_MINOR 0)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
set ( CMAKE_VERBOSE_MAKEFILE OFF )
set ( CMAKE_BUILD_TYPE Debug )
# Warn about everything. Beautiful code doesn't warn.
set (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-Wl,-lprofiler")
set (CMAKE_CXX_FLAGS "-Wall")
# Optimisations - can cause issues.
include (OptimizeForArchitecture)
OptimizeForArchitecture()
find_package (Jack REQUIRED)
find_package (Sndfile REQUIRED)
find_package (Mosquitto REQUIRED)
include_directories (includes)
include_directories (${SNDFILE_INCLUDE_DIR})
include_directories (${JACK_INCLUDE_DIRS})
include_directories (${MOSQUITTO_INCLUDE_DIR})
# Packaging
SET(CPACK_GENERATOR "DEB;TGZ;ZIP;STGZ;RPM")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Changeling is a broadcast profanity delay for the JACK Audio Connection Kit.")
SET(CPACK_PACKAGE_VENDOR "James Harrison <james at talkunafraid dot co dot uk>")
SET(CPACK_PACKAGE_CONTACT "James Harrison <james at talkunafraid dot co dot uk>")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.markdown")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/README.markdown")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libjack0 (>=0.112), libsndfile1 (>=1.0.15), libmosquitto0 (>=0.14)")
INCLUDE(CPack)
INCLUDE(InstallRequiredSystemLibraries)
# add a target to generate API documentation with Doxygen
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
add_executable (changeling src/bin/changeling.cpp)
target_link_libraries (changeling ${MOSQUITTO_LIBRARIES} ${SNDFILE_LIBRARIES} ${JACK_LIBRARIES})
INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/changeling DESTINATION bin)