You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

89 lines
1.9 KiB

cmake_minimum_required(VERSION 2.0)
PROJECT(jsweeper)
INCLUDE( ${CMAKE_ROOT}/Modules/FindPkgConfig.cmake )
INCLUDE( ${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake )
INCLUDE( CheckLibraryExists)
pkg_check_modules(JACK jack>=0.118)
pkg_check_modules(GTKMM gtkmm-2.4>=2.4)
pkg_check_modules(GLIBMM glibmm-2.4>=2.4)
pkg_check_modules(GDKMM gdkmm-2.4>=2.4)
pkg_check_modules(CAIROMM cairomm-1.0>=1.0)
pkg_check_modules(DBUS dbus-glib-1)
pkg_check_modules(PCRE libpcrecpp)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/jsweeper.ui
COMMAND gtk-builder-convert ${CMAKE_CURRENT_SOURCE_DIR}/src/jsweeper.glade ${CMAKE_CURRENT_BINARY_DIR}/jsweeper.ui
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/jsweeper.glade
)
SET(SOURCES
src/config.cpp
src/config.h
src/colour.cpp
src/colour.h
src/gui.cpp
src/gui.h
src/inifile.cpp
src/inifile.h
src/jack.cpp
src/jack.h
src/jsweeper.cpp
jsweeper.ui
src/matrix.cpp
src/matrix.h
src/port.cpp
src/port.h
src/portmanager.cpp
src/portmanager.h
src/preferences_gui.cpp
src/preferences_gui.h
src/session.cpp
src/session.h
src/session_gui.cpp
src/session_gui.h
)
LINK_DIRECTORIES(
${JACK_LIBRARY_DIRS}
${GLIBMM_LIBRARY_DIRS}
${GDKMM_LIBRARY_DIRS}
${GTKMM_LIBRARY_DIRS}
${CAIROMM_LIBRARY_DIRS}
${DBUS_LIBRARY_DIRS}
${PCRE_LIBRARY_DIRS}
)
INCLUDE_DIRECTORIES(
${JACK_INCLUDE_DIRS}
${GLIBMM_INCLUDE_DIRS}
${GDKMM_INCLUDE_DIRS}
${GTKMM_INCLUDE_DIRS}
${CAIROMM_INCLUDE_DIRS}
${DBUS_INCLUDE_DIRS}
${PCRE_INCLUDE_DIRS}
)
CHECK_LIBRARY_EXISTS(jack jack_set_port_rename_callback ${JACK_INCLUDE_DIRS}/jack.h RENAME_FOUND)
IF (RENAME_FOUND)
ADD_DEFINITIONS(-DHAVE_RENAME)
ENDIF()
ADD_DEFINITIONS(-Wall -Wextra -ansi -pedantic)
ADD_EXECUTABLE(jsweeper ${SOURCES})
TARGET_LINK_LIBRARIES(jsweeper
${JACK_LIBRARIES}
${GLIBMM_LIBRARIES}
${GDKMM_LIBRARIES}
${GTKMM_LIBRARIES}
${CAIROMM_LIBRARIES}
${DBUS_LIBRARIES}
${PCRE_LIBRARIES}
)
INSTALL(PROGRAMS jsweeper DESTINATION bin)
INSTALL(FILES jsweeper.ui DESTINATION share/jsweeper)