diff --git a/CMakeLists.txt b/CMakeLists.txt index 719ca20..c81549b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,56 +1,40 @@ -# Rosegarden -# A MIDI and audio sequencer and musical notation editor. +################################################# # -# This program is Copyright 2000-2008 -# Guillaume Laurent , -# Chris Cannam , -# Richard Bown +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net # -# The moral rights of Guillaume Laurent, Chris Cannam, and Richard -# Bown to claim authorship of this work have been asserted. +# Improvements and feedback are welcome # -# This file is Copyright 2006-2008 -# Pedro Lopez-Cabanillas +# This file is released under GPL >= 2 # -# Other copyrights also apply to some parts of this work. Please -# see the AUTHORS file and individual file headers for details. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. See the file -# COPYING included with this distribution for more information. +################################################# + +cmake_minimum_required( VERSION 2.8 ) + + +##### general package setup ##################### # The name of our project is "ROSEGARDEN". CMakeLists files in this project can -# refer to the root source directory of the project as ${ROSEGARDEN_SOURCE_DIR} +# refer to the root source directory of the project as ${ROSEGARDEN_SOURCE_DIR} # and to the root binary directory of the project as ${ROSEGARDEN_BINARY_DIR} PROJECT(ROSEGARDEN) -# CMake supports KDE checks since this version number -CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2) -# Show full commands and messages. It generates a lot of console output. -# It is necessary for Eclipse warning/error parser, -# but it can be enabled anyway with "make VERBOSE=1" -SET(CMAKE_VERBOSE_MAKEFILE OFF) +##### include essential cmake modules ########### -# Seems that relative paths break some scripts. Don't set it ON -SET(CMAKE_USE_RELATIVE_PATHS OFF) +include( CheckCXXSourceCompiles ) +include( CheckFunctionExists ) +include( CheckIncludeFileCXX ) +include( CheckLibraryExists ) +include( CheckStructHasMember ) +include( CheckSymbolExists ) +include( CheckTypeSize ) +include( FindPkgConfig ) -# Rebuild the object files if the rules have changed, but not the actual source -# files or headers (e.g. if you changed the some compiler switches) -SET(CMAKE_SKIP_RULE_DEPENDENCY OFF) - -# Misc settings -SET(CMAKE_COLOR_MAKEFILE ON) -SET(CMAKE_INCLUDE_CURRENT_DIR ON) -SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON) - -# Additional CMake modules for 3rd party library checks reside here -SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_admin") +##### set up versioning ######################### # Mark as advanced -MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH +MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH CMAKE_BACKWARDS_COMPATIBILITY) @@ -66,15 +50,32 @@ IF(VERSION_SUFFIX) ENDIF(VERSION_SUFFIX) ADD_DEFINITIONS(-D'VERSION="${VERSION}"') -# User options -OPTION(WANT_DEBUG "Include debug support" OFF) -OPTION(WANT_FULLDBG "Full debug support (BIG executables!)" OFF) -OPTION(WANT_SOUND "Include Sound support" ON) -OPTION(WANT_JACK "Include Jack (Jack Audio Connection Kit) support" ON) -OPTION(WANT_DSSI "Include DSSI support" ON) -OPTION(WANT_LIRC "Include LIRC (Linux Infrared Remote Control) support" OFF) -OPTION(WANT_PCH "Use precompiled headers" OFF) -OPTION(WANT_TEST "Perform unit tests" OFF) + +##### include our cmake modules ################# + +set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ) +include( TDEMacros ) + + +##### setup install paths ####################### + +include( TDESetupPaths ) +tde_setup_paths( ) + + +##### user requested modules #################### + +option( BUILD_ALL "Build all" OFF ) +option( BUILD_DOC "Build doc" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) +option( WANT_DEBUG "Include debug support" OFF ) +option( WANT_FULLDBG "Full debug support (BIG executables!)" OFF ) +option( WANT_SOUND "Include Sound support" ${BUILD_ALL} ) +option( WANT_JACK "Include Jack (Jack Audio Connection Kit) support" ${BUILD_ALL} ) +option( WANT_DSSI "Include DSSI support" ${BUILD_ALL} ) +option( WANT_LIRC "Include LIRC (Linux Infrared Remote Control) support" OFF ) +option( WANT_PCH "Use precompiled headers" OFF ) +option( WANT_TEST "Perform unit tests" OFF ) IF(WANT_TEST) ENABLE_TESTING() @@ -86,314 +87,37 @@ IF(NOT WANT_SOUND) ADD_DEFINITIONS(-DNO_SOUND) ENDIF(NOT WANT_SOUND) -# Check for KDE3 -FIND_PACKAGE(KDE3 REQUIRED QUIET) -IF(QT_FOUND) - ADD_DEFINITIONS(${QT_DEFINITIONS}) - MESSAGE(STATUS "Found Qt3 (version ${qt_version_str})") - #MESSAGE("QT_LIBRARIES: ${QT_LIBRARIES}") -ELSE(QT_FOUND) - MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4") - SET(QT_INCLUDE_DIR "/usr/include/qt4") -ENDIF(QT_FOUND) -SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt") -SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc") -IF(KDE3_FOUND) - ADD_DEFINITIONS(${KDE3_DEFINITIONS}) - #MESSAGE("KDE3PREFIX: ${KDE3PREFIX}") - KDE3_PRINT_RESULTS() - #MESSAGE("QT_AND_TDECORE_LIBS: ${QT_AND_TDECORE_LIBS}") -ELSE(KDE3_FOUND) - MESSAGE(FATAL_ERROR "KDE3 Not found") -ENDIF(KDE3_FOUND) - -# Clear the flags set by FindKDE3 -SET(CMAKE_CXX_FLAGS "-I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT") -MARK_AS_ADVANCED(KDE3_BUILD_TESTS - KDE3_ENABLE_FINAL - KDE3_DCOPIDL_EXECUTABLE - KDE3_DCOPIDL2CPP_EXECUTABLE - KDE3_INCLUDE_DIR - KDE3_KCFGC_EXECUTABLE - KDE3_TDECORE_LIBRARY - KDECONFIG_EXECUTABLE ) - -# Provide the KDE3 prefix as a default prefix (if the user has CMake 2.4.4) -IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - SET(CMAKE_INSTALL_PREFIX ${KDE3PREFIX} CACHE PATH - "Install path prefix, prepended onto install directories." FORCE) -ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - -# Check for PKG-CONFIG -FIND_PACKAGE(PkgConfig REQUIRED) -IF(PKG_CONFIG_FOUND) - MESSAGE(STATUS "Program pkg-config found (${PKG_CONFIG_EXECUTABLE})") -ELSE(PKG_CONFIG_FOUND) - MESSAGE(FATAL_ERROR "Program pkg-config not found") -ENDIF(PKG_CONFIG_FOUND) - -# Initialize some variables -SET(HAVE_XFT FALSE) -SET(HAVE_ALSA FALSE) -SET(HAVE_JACK FALSE) -SET(HAVE_DSSI FALSE) -SET(HAVE_LIBLO FALSE) -SET(HAVE_LIBLRDF FALSE) -SET(HAVE_LADSPA FALSE) -SET(HAVE_LIRC FALSE) -SET(HAVE_FFTW3F FALSE) - -# Check for Xft -PKG_CHECK_MODULES(XFT xft>=2.1.0) -IF(XFT_FOUND) - ADD_DEFINITIONS(-DHAVE_XFT) - SET(HAVE_XFT TRUE) - SET(XFT_LIBS ${XFT_LIBRARIES}) - #MESSAGE("XFT_LIBS: ${XFT_LIBS}") - LIST(APPEND XFT_LIB_DIR ${XFT_LIBRARY_DIRS} ${XFT_LIBDIR}) - #MESSAGE("XFT_LIB_DIR: ${XFT_LIB_DIR}") - LIST(APPEND XFT_INC_DIR ${XFT_INCLUDE_DIRS} ${XFT_INCLUDEDIR}) - #MESSAGE("XFT_INC_DIR: ${XFT_INC_DIR}") -ENDIF(XFT_FOUND) - -IF(WANT_SOUND) - - # Check for ALSA 1.0 - PKG_CHECK_MODULES(ALSA REQUIRED alsa>=1.0) - IF(ALSA_FOUND) - SET(HAVE_ALSA TRUE) - ADD_DEFINITIONS(-DHAVE_ALSA) - SET(ALSA_LIBS ${ALSA_LIBRARIES}) - #MESSAGE("ALSA_LIBS: ${ALSA_LIBS}") - LIST(APPEND ALSA_LIB_DIR ${ALSA_LIBRARY_DIRS} ${ALSA_LIBDIR} ) - #MESSAGE("ALSA_LIB_DIR: ${ALSA_LIB_DIR}") - LIST(APPEND ALSA_INC_DIR ${ALSA_INCLUDE_DIRS} ${ALSA_INCLUDEDIR}) - #MESSAGE("ALSA_INC_DIR: ${ALSA_INC_DIR}") - ELSE(ALSA_FOUND) - MESSAGE(FATAL_ERROR "Please install the required package. Aborting") - ENDIF(ALSA_FOUND) - - IF(WANT_JACK) - PKG_CHECK_MODULES(JACK jack>=0.77) - IF(JACK_FOUND) - ADD_DEFINITIONS(-DHAVE_LIBJACK) - SET(HAVE_JACK TRUE) - SET(JACK_LIBS ${JACK_LIBRARIES}) - #MESSAGE("JACK_LIBS: ${JACK_LIBS}") - LIST(APPEND JACK_LIB_DIR ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS}) - #MESSAGE("JACK_LIB_DIR: ${JACK_LIB_DIR}") - LIST(APPEND JACK_INC_DIR ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS}) - #MESSAGE("JACK_INC_DIR: ${JACK_INC_DIR}") - ENDIF(JACK_FOUND) - ENDIF(WANT_JACK) - - IF(WANT_DSSI) - PKG_CHECK_MODULES(DSSI dssi>=0.4) - IF(DSSI_FOUND) - ADD_DEFINITIONS(-DHAVE_DSSI) - SET(HAVE_DSSI TRUE) - LIST(APPEND DSSI_INC_DIR ${DSSI_INCLUDE_DIRS} ${DSSI_INCLUDEDIR}) - #MESSAGE("DSSI_INC_DIR: ${DSSI_INC_DIR}") - ENDIF(DSSI_FOUND) - ENDIF(WANT_DSSI) - - PKG_CHECK_MODULES(LIBLO liblo>=0.7) - IF(LIBLO_FOUND) - ADD_DEFINITIONS(-DHAVE_LIBLO) - SET(HAVE_LIBLO TRUE) - SET(LIBLO_LIBS ${LIBLO_LIBRARIES}) - #MESSAGE("LIBLO_LIBS: ${LIBLO_LIBS}") - LIST(APPEND LIBLO_LIB_DIR ${LIBLO_LIBDIR} ${LIBLO_LIBRARY_DIRS}) - #MESSAGE("LIBLO_LIB_DIR: ${LIBLO_LIB_DIR}") - LIST(APPEND LIBLO_INC_DIR ${LIBLO_INCLUDEDIR} ${LIBLO_INCLUDE_DIRS}) - #MESSAGE("LIBLO_INC_DIR: ${LIBLO_INC_DIR}") - ENDIF(LIBLO_FOUND) - - PKG_CHECK_MODULES(LRDF lrdf>=0.3) - IF(LRDF_FOUND) - SET(HAVE_LIBLRDF TRUE) - ADD_DEFINITIONS(-DHAVE_LIBLRDF) - SET(LRDF_LIBS ${LRDF_LIBRARIES}) - #MESSAGE("LRDF_LIBS: ${LRDF_LIBS}") - LIST(APPEND LRDF_LIB_DIR ${LRDF_LIBDIR} ${LRDF_LIBRARY_DIRS}) - #MESSAGE("LRDF_LIB_DIR: ${LRDF_LIB_DIR}") - LIST(APPEND LRDF_INC_DIR ${LRDF_INCLUDEDIR} ${LRDF_INCLUDE_DIRS}) - #MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}") - ENDIF(LRDF_FOUND) - - FIND_PACKAGE(LADSPA QUIET) - IF(LADSPA_FOUND) - SET(HAVE_LADSPA TRUE) - ADD_DEFINITIONS(-DHAVE_LADSPA) - SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR}) - MESSAGE(STATUS "Found LADSPA (${LADSPA_INC_DIR})") - ENDIF(LADSPA_FOUND) - -ENDIF(WANT_SOUND) - -PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0) -IF(FFTW3F_FOUND) - ADD_DEFINITIONS(-DHAVE_FFTW3F) - SET(HAVE_FFTW3F TRUE) - SET(FFTW3F_LIBS ${FFTW3F_LIBRARIES}) - #MESSAGE("FFTW3F_LIBS: ${FFTW3F_LIBS}") - LIST(APPEND FFTW3F_LIB_DIR ${FFTW3F_LIBDIR} ${FFTW3F_LIBRARY_DIRS}) - #MESSAGE("FFTW3F_LIB_DIR: ${FFTW3F_LIB_DIR}") - LIST(APPEND FFTW3F_INC_DIR ${FFTW3F_INCLUDEDIR} ${FFTW3F_INCLUDE_DIRS}) - #MESSAGE("FFTW3F_INC_DIR: ${FFTW3F_INC_DIR}") -ELSE(FFTW3F_FOUND) - MESSAGE(FATAL_ERROR "Please install the required package. Aborting") -ENDIF(FFTW3F_FOUND) - -IF(WANT_LIRC) - FIND_PACKAGE(LIRC QUIET) - IF(LIRC_FOUND) - SET(HAVE_LIRC TRUE) - ADD_DEFINITIONS(-DHAVE_LIRC) - MESSAGE(STATUS "Found LIRC (${LIRC_LIBRARY})") - SET(LIRC_LIBS ${LIRC_LIBRARY}) - SET(LIRC_INC_DIR ${LIRC_INCLUDE_DIR}) - SET(LIRC_LIB_DIR ${LIRC_LIBRARY_DIR}) - #MESSAGE("LIRC_LIBS: ${LIRC_LIBS}") - #MESSAGE("LIRC_LIB_DIR: ${LIRC_LIB_DIR}") - #MESSAGE("LIRC_INC_DIR: ${LIRC_INC_DIR}") - ENDIF(LIRC_FOUND) -ENDIF(WANT_LIRC) - -FIND_PACKAGE(MSGFMT REQUIRED) -IF(MSGFMT_FOUND) - MESSAGE(STATUS "Program msgfmt found (${MSGFMT_EXECUTABLE})") -ENDIF(MSGFMT_FOUND) - -FIND_PACKAGE(KDECONFIG) -IF(KDECONFIG_EXECUTABLE) - MESSAGE(STATUS "Program kde-config found (${KDECONFIG_EXECUTABLE})") - #MESSAGE("KDE3PREFIX: ${KDE3PREFIX}") -ENDIF(KDECONFIG_EXECUTABLE) - -FIND_PACKAGE(MEINPROC REQUIRED) -IF(MEINPROC_FOUND) - MESSAGE(STATUS "Program meinproc found (${MEINPROC_EXECUTABLE})") -ENDIF(MEINPROC_FOUND) - -# Check GCC for PCH support -SET(USE_PCH FALSE) -IF(WANT_PCH) - FIND_PACKAGE(PCHSupport) - IF(PCHSupport_FOUND) - SET(USE_PCH TRUE) - ADD_DEFINITIONS(-DUSE_PCH) - MESSAGE(STATUS "Enabling precompiled headers for GCC ${gcc_compiler_version}") - ENDIF(PCHSupport_FOUND) -ENDIF(WANT_PCH) - -# Check PTHREAD_MUTEX_RECURSIVE -INCLUDE(CheckCSourceCompiles) -CHECK_C_SOURCE_COMPILES( - "#include - int main(int argc, char **argv) { - pthread_mutexattr_t attr; - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - return 0; - }" PTHREAD_HAS_MUTEX_RECURSIVE) -IF(PTHREAD_HAS_MUTEX_RECURSIVE) - ADD_DEFINITIONS(-DHAVE_PTHREAD_MUTEX_RECURSIVE) -ENDIF(PTHREAD_HAS_MUTEX_RECURSIVE) -# End of PTHREAD_MUTEX_RECURSIVE Test - -SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -w -fexceptions -DNDEBUG -include tqt.h") -SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -Wall -fexceptions -DDEBUG -include tqt.h") -SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -Wall -fexceptions -DDEBUG -include tqt.h") - -MESSAGE(STATUS "Rosegarden ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}") - -IF(WANT_DEBUG) - IF(WANT_FULLDBG) - MESSAGE(STATUS "Configured to compile including full debug information in the executables") - SET(CMAKE_BUILD_TYPE Debug CACHE STRING - "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) - ELSE(WANT_FULLDBG) - MESSAGE(STATUS "Configured to compile including debug information in the executables") - SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING - "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) - ENDIF(WANT_FULLDBG) -ELSE(WANT_DEBUG) - MESSAGE(STATUS "Configured to compile for release without debug information") - SET(CMAKE_BUILD_TYPE Release CACHE STRING - "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) -ENDIF(WANT_DEBUG) -MARK_AS_ADVANCED(CMAKE_BUILD_TYPE) - -# Warn the user if important libraries are missing -INCLUDE(UserWarnings) - -# Recurse into the "src" subdirectory. This does not actually -# cause another cmake executable to run. The same process will walk through -# the project's entire directory structure. -# Output directory will be "RGbuild/" -ADD_SUBDIRECTORY(src RGbuild) - -# Build and install the translations directory -ADD_SUBDIRECTORY(po RGbuild/po) - -# Build and install the documentation directory -ADD_SUBDIRECTORY(docs RGbuild/docs) - -# Install data files -ADD_SUBDIRECTORY(data RGbuild/data) - -# install some documents... -# INSTALL( FILES AUTHORS COPYING README TRANSLATORS INSTALL rosegarden.lsm -# DESTINATION share/doc/rosegarden-${VERSION} ) +##### configure checks ########################## + +include( ConfigureChecks.cmake ) + + +###### global compiler settings ################# + +add_definitions( + -DHAVE_CONFIG_H +) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) + + +##### source directories ######################## + +add_subdirectory( src ) +add_subdirectory( data ) +tde_conditional_add_subdirectory( BUILD_DOC doc ) +tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po ) + + +##### write configure files ##################### + +configure_file( config.h.cmake config.h @ONLY ) # create and install the version file FILE(WRITE version.txt "${VERSION}\n") -INSTALL( FILES version.txt - DESTINATION ${KDE3DATADIR}/rosegarden ) - -# uninstall custom target -CONFIGURE_FILE( - "${CMAKE_SOURCE_DIR}/cmake_admin/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) - -ADD_CUSTOM_TARGET(uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") - -# Custom target trying to clean the CMake generated files -ADD_CUSTOM_TARGET ( distclean - COMMAND rm -f {,src/,po/,docs/,data/}CMakeCache.txt - COMMAND rm -f {,src/,po/,docs/,data/}cmake_install.cmake - COMMAND rm -f {,src/,po/,docs/,data/}cmake_uninstall.cmake - COMMAND rm -f {,src/,po/,docs/,data/}CPackConfig.cmake - COMMAND rm -f {,src/,po/,docs/,data/}CPackSourceConfig.cmake - COMMAND rm -f {,src/,po/,docs/,data/}install_manifest.txt - COMMAND rm -f {,src/,po/,docs/,data/}progress.make - COMMAND rm -f {,src/,po/,docs/,data/}rosegarden.spec - COMMAND rm -f {,src/,po/,docs/,data/}Makefile - COMMAND rm -rf {,src/,po/,docs/,data/}CMakeFiles - COMMAND rm -rf {,src/,po/,docs/,data/}_CPack_Packages - COMMAND rm -rf RGbuild/* - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} -) -ADD_DEPENDENCIES(distclean clean) +INSTALL( FILES version.txt DESTINATION ${DATA_INSTALL_DIR}/rosegarden ) # configure the RPM spec -CONFIGURE_FILE( - "${CMAKE_SOURCE_DIR}/rosegarden.spec.in" - "${CMAKE_SOURCE_DIR}/rosegarden.spec" - IMMEDIATE @ONLY) - -# tarball target -ADD_CUSTOM_TARGET ( tarball - COMMAND mkdir -p rosegarden-${VERSION} - COMMAND cp -r cmake_admin rosegarden-${VERSION} - COMMAND cp -r data rosegarden-${VERSION} - COMMAND cp -r docs rosegarden-${VERSION} - COMMAND cp -r po rosegarden-${VERSION} - COMMAND cp -r src rosegarden-${VERSION} - COMMAND cp CMakeLists.txt AUTHORS COPYING Doxyfile INSTALL README rosegarden.* TRANSLATORS rosegarden-${VERSION} - COMMAND tar -cj --exclude .svn --exclude gettext-0.10.35-kde -f rosegarden-${VERSION}.tar.bz2 rosegarden-${VERSION} - COMMAND rm -rf rosegarden-${VERSION} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} -) +CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/rosegarden.spec.in" "${CMAKE_SOURCE_DIR}/rosegarden.spec" IMMEDIATE @ONLY) \ No newline at end of file diff --git a/CMakeLists.txt.orig b/CMakeLists.txt.orig new file mode 100644 index 0000000..719ca20 --- /dev/null +++ b/CMakeLists.txt.orig @@ -0,0 +1,399 @@ +# Rosegarden +# A MIDI and audio sequencer and musical notation editor. +# +# This program is Copyright 2000-2008 +# Guillaume Laurent , +# Chris Cannam , +# Richard Bown +# +# The moral rights of Guillaume Laurent, Chris Cannam, and Richard +# Bown to claim authorship of this work have been asserted. +# +# This file is Copyright 2006-2008 +# Pedro Lopez-Cabanillas +# +# Other copyrights also apply to some parts of this work. Please +# see the AUTHORS file and individual file headers for details. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. See the file +# COPYING included with this distribution for more information. + +# The name of our project is "ROSEGARDEN". CMakeLists files in this project can +# refer to the root source directory of the project as ${ROSEGARDEN_SOURCE_DIR} +# and to the root binary directory of the project as ${ROSEGARDEN_BINARY_DIR} +PROJECT(ROSEGARDEN) + +# CMake supports KDE checks since this version number +CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2) + +# Show full commands and messages. It generates a lot of console output. +# It is necessary for Eclipse warning/error parser, +# but it can be enabled anyway with "make VERBOSE=1" +SET(CMAKE_VERBOSE_MAKEFILE OFF) + +# Seems that relative paths break some scripts. Don't set it ON +SET(CMAKE_USE_RELATIVE_PATHS OFF) + +# Rebuild the object files if the rules have changed, but not the actual source +# files or headers (e.g. if you changed the some compiler switches) +SET(CMAKE_SKIP_RULE_DEPENDENCY OFF) + +# Misc settings +SET(CMAKE_COLOR_MAKEFILE ON) +SET(CMAKE_INCLUDE_CURRENT_DIR ON) +SET(CMAKE_BUILD_WITH_INSTALL_RPATH ON) + +# Additional CMake modules for 3rd party library checks reside here +SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_admin") + +# Mark as advanced +MARK_AS_ADVANCED(EXECUTABLE_OUTPUT_PATH + LIBRARY_OUTPUT_PATH + CMAKE_BACKWARDS_COMPATIBILITY) + +# Rosegarden version string +SET (VERSION_MAJOR "1") +SET (VERSION_MINOR "7") +SET (VERSION_PATCH "0") +# comment out the next line for a public release +#SET (VERSION_SUFFIX "svn") +SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +IF(VERSION_SUFFIX) + SET (VERSION "${VERSION}-${VERSION_SUFFIX}") +ENDIF(VERSION_SUFFIX) +ADD_DEFINITIONS(-D'VERSION="${VERSION}"') + +# User options +OPTION(WANT_DEBUG "Include debug support" OFF) +OPTION(WANT_FULLDBG "Full debug support (BIG executables!)" OFF) +OPTION(WANT_SOUND "Include Sound support" ON) +OPTION(WANT_JACK "Include Jack (Jack Audio Connection Kit) support" ON) +OPTION(WANT_DSSI "Include DSSI support" ON) +OPTION(WANT_LIRC "Include LIRC (Linux Infrared Remote Control) support" OFF) +OPTION(WANT_PCH "Use precompiled headers" OFF) +OPTION(WANT_TEST "Perform unit tests" OFF) + +IF(WANT_TEST) + ENABLE_TESTING() +ENDIF(WANT_TEST) + +IF(NOT WANT_SOUND) + SET(WANT_JACK OFF) + SET(WANT_DSSI OFF) + ADD_DEFINITIONS(-DNO_SOUND) +ENDIF(NOT WANT_SOUND) + +# Check for KDE3 +FIND_PACKAGE(KDE3 REQUIRED QUIET) +IF(QT_FOUND) + ADD_DEFINITIONS(${QT_DEFINITIONS}) + MESSAGE(STATUS "Found Qt3 (version ${qt_version_str})") + #MESSAGE("QT_LIBRARIES: ${QT_LIBRARIES}") +ELSE(QT_FOUND) + MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4") + SET(QT_INCLUDE_DIR "/usr/include/qt4") +ENDIF(QT_FOUND) +SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt") +SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc") +IF(KDE3_FOUND) + ADD_DEFINITIONS(${KDE3_DEFINITIONS}) + #MESSAGE("KDE3PREFIX: ${KDE3PREFIX}") + KDE3_PRINT_RESULTS() + #MESSAGE("QT_AND_TDECORE_LIBS: ${QT_AND_TDECORE_LIBS}") +ELSE(KDE3_FOUND) + MESSAGE(FATAL_ERROR "KDE3 Not found") +ENDIF(KDE3_FOUND) + +# Clear the flags set by FindKDE3 +SET(CMAKE_CXX_FLAGS "-I/usr/include/tqt -include tqt.h -DTQT_THREAD_SUPPORT") +MARK_AS_ADVANCED(KDE3_BUILD_TESTS + KDE3_ENABLE_FINAL + KDE3_DCOPIDL_EXECUTABLE + KDE3_DCOPIDL2CPP_EXECUTABLE + KDE3_INCLUDE_DIR + KDE3_KCFGC_EXECUTABLE + KDE3_TDECORE_LIBRARY + KDECONFIG_EXECUTABLE ) + +# Provide the KDE3 prefix as a default prefix (if the user has CMake 2.4.4) +IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + SET(CMAKE_INSTALL_PREFIX ${KDE3PREFIX} CACHE PATH + "Install path prefix, prepended onto install directories." FORCE) +ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + +# Check for PKG-CONFIG +FIND_PACKAGE(PkgConfig REQUIRED) +IF(PKG_CONFIG_FOUND) + MESSAGE(STATUS "Program pkg-config found (${PKG_CONFIG_EXECUTABLE})") +ELSE(PKG_CONFIG_FOUND) + MESSAGE(FATAL_ERROR "Program pkg-config not found") +ENDIF(PKG_CONFIG_FOUND) + +# Initialize some variables +SET(HAVE_XFT FALSE) +SET(HAVE_ALSA FALSE) +SET(HAVE_JACK FALSE) +SET(HAVE_DSSI FALSE) +SET(HAVE_LIBLO FALSE) +SET(HAVE_LIBLRDF FALSE) +SET(HAVE_LADSPA FALSE) +SET(HAVE_LIRC FALSE) +SET(HAVE_FFTW3F FALSE) + +# Check for Xft +PKG_CHECK_MODULES(XFT xft>=2.1.0) +IF(XFT_FOUND) + ADD_DEFINITIONS(-DHAVE_XFT) + SET(HAVE_XFT TRUE) + SET(XFT_LIBS ${XFT_LIBRARIES}) + #MESSAGE("XFT_LIBS: ${XFT_LIBS}") + LIST(APPEND XFT_LIB_DIR ${XFT_LIBRARY_DIRS} ${XFT_LIBDIR}) + #MESSAGE("XFT_LIB_DIR: ${XFT_LIB_DIR}") + LIST(APPEND XFT_INC_DIR ${XFT_INCLUDE_DIRS} ${XFT_INCLUDEDIR}) + #MESSAGE("XFT_INC_DIR: ${XFT_INC_DIR}") +ENDIF(XFT_FOUND) + +IF(WANT_SOUND) + + # Check for ALSA 1.0 + PKG_CHECK_MODULES(ALSA REQUIRED alsa>=1.0) + IF(ALSA_FOUND) + SET(HAVE_ALSA TRUE) + ADD_DEFINITIONS(-DHAVE_ALSA) + SET(ALSA_LIBS ${ALSA_LIBRARIES}) + #MESSAGE("ALSA_LIBS: ${ALSA_LIBS}") + LIST(APPEND ALSA_LIB_DIR ${ALSA_LIBRARY_DIRS} ${ALSA_LIBDIR} ) + #MESSAGE("ALSA_LIB_DIR: ${ALSA_LIB_DIR}") + LIST(APPEND ALSA_INC_DIR ${ALSA_INCLUDE_DIRS} ${ALSA_INCLUDEDIR}) + #MESSAGE("ALSA_INC_DIR: ${ALSA_INC_DIR}") + ELSE(ALSA_FOUND) + MESSAGE(FATAL_ERROR "Please install the required package. Aborting") + ENDIF(ALSA_FOUND) + + IF(WANT_JACK) + PKG_CHECK_MODULES(JACK jack>=0.77) + IF(JACK_FOUND) + ADD_DEFINITIONS(-DHAVE_LIBJACK) + SET(HAVE_JACK TRUE) + SET(JACK_LIBS ${JACK_LIBRARIES}) + #MESSAGE("JACK_LIBS: ${JACK_LIBS}") + LIST(APPEND JACK_LIB_DIR ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS}) + #MESSAGE("JACK_LIB_DIR: ${JACK_LIB_DIR}") + LIST(APPEND JACK_INC_DIR ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS}) + #MESSAGE("JACK_INC_DIR: ${JACK_INC_DIR}") + ENDIF(JACK_FOUND) + ENDIF(WANT_JACK) + + IF(WANT_DSSI) + PKG_CHECK_MODULES(DSSI dssi>=0.4) + IF(DSSI_FOUND) + ADD_DEFINITIONS(-DHAVE_DSSI) + SET(HAVE_DSSI TRUE) + LIST(APPEND DSSI_INC_DIR ${DSSI_INCLUDE_DIRS} ${DSSI_INCLUDEDIR}) + #MESSAGE("DSSI_INC_DIR: ${DSSI_INC_DIR}") + ENDIF(DSSI_FOUND) + ENDIF(WANT_DSSI) + + PKG_CHECK_MODULES(LIBLO liblo>=0.7) + IF(LIBLO_FOUND) + ADD_DEFINITIONS(-DHAVE_LIBLO) + SET(HAVE_LIBLO TRUE) + SET(LIBLO_LIBS ${LIBLO_LIBRARIES}) + #MESSAGE("LIBLO_LIBS: ${LIBLO_LIBS}") + LIST(APPEND LIBLO_LIB_DIR ${LIBLO_LIBDIR} ${LIBLO_LIBRARY_DIRS}) + #MESSAGE("LIBLO_LIB_DIR: ${LIBLO_LIB_DIR}") + LIST(APPEND LIBLO_INC_DIR ${LIBLO_INCLUDEDIR} ${LIBLO_INCLUDE_DIRS}) + #MESSAGE("LIBLO_INC_DIR: ${LIBLO_INC_DIR}") + ENDIF(LIBLO_FOUND) + + PKG_CHECK_MODULES(LRDF lrdf>=0.3) + IF(LRDF_FOUND) + SET(HAVE_LIBLRDF TRUE) + ADD_DEFINITIONS(-DHAVE_LIBLRDF) + SET(LRDF_LIBS ${LRDF_LIBRARIES}) + #MESSAGE("LRDF_LIBS: ${LRDF_LIBS}") + LIST(APPEND LRDF_LIB_DIR ${LRDF_LIBDIR} ${LRDF_LIBRARY_DIRS}) + #MESSAGE("LRDF_LIB_DIR: ${LRDF_LIB_DIR}") + LIST(APPEND LRDF_INC_DIR ${LRDF_INCLUDEDIR} ${LRDF_INCLUDE_DIRS}) + #MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}") + ENDIF(LRDF_FOUND) + + FIND_PACKAGE(LADSPA QUIET) + IF(LADSPA_FOUND) + SET(HAVE_LADSPA TRUE) + ADD_DEFINITIONS(-DHAVE_LADSPA) + SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR}) + MESSAGE(STATUS "Found LADSPA (${LADSPA_INC_DIR})") + ENDIF(LADSPA_FOUND) + +ENDIF(WANT_SOUND) + +PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0) +IF(FFTW3F_FOUND) + ADD_DEFINITIONS(-DHAVE_FFTW3F) + SET(HAVE_FFTW3F TRUE) + SET(FFTW3F_LIBS ${FFTW3F_LIBRARIES}) + #MESSAGE("FFTW3F_LIBS: ${FFTW3F_LIBS}") + LIST(APPEND FFTW3F_LIB_DIR ${FFTW3F_LIBDIR} ${FFTW3F_LIBRARY_DIRS}) + #MESSAGE("FFTW3F_LIB_DIR: ${FFTW3F_LIB_DIR}") + LIST(APPEND FFTW3F_INC_DIR ${FFTW3F_INCLUDEDIR} ${FFTW3F_INCLUDE_DIRS}) + #MESSAGE("FFTW3F_INC_DIR: ${FFTW3F_INC_DIR}") +ELSE(FFTW3F_FOUND) + MESSAGE(FATAL_ERROR "Please install the required package. Aborting") +ENDIF(FFTW3F_FOUND) + +IF(WANT_LIRC) + FIND_PACKAGE(LIRC QUIET) + IF(LIRC_FOUND) + SET(HAVE_LIRC TRUE) + ADD_DEFINITIONS(-DHAVE_LIRC) + MESSAGE(STATUS "Found LIRC (${LIRC_LIBRARY})") + SET(LIRC_LIBS ${LIRC_LIBRARY}) + SET(LIRC_INC_DIR ${LIRC_INCLUDE_DIR}) + SET(LIRC_LIB_DIR ${LIRC_LIBRARY_DIR}) + #MESSAGE("LIRC_LIBS: ${LIRC_LIBS}") + #MESSAGE("LIRC_LIB_DIR: ${LIRC_LIB_DIR}") + #MESSAGE("LIRC_INC_DIR: ${LIRC_INC_DIR}") + ENDIF(LIRC_FOUND) +ENDIF(WANT_LIRC) + +FIND_PACKAGE(MSGFMT REQUIRED) +IF(MSGFMT_FOUND) + MESSAGE(STATUS "Program msgfmt found (${MSGFMT_EXECUTABLE})") +ENDIF(MSGFMT_FOUND) + +FIND_PACKAGE(KDECONFIG) +IF(KDECONFIG_EXECUTABLE) + MESSAGE(STATUS "Program kde-config found (${KDECONFIG_EXECUTABLE})") + #MESSAGE("KDE3PREFIX: ${KDE3PREFIX}") +ENDIF(KDECONFIG_EXECUTABLE) + +FIND_PACKAGE(MEINPROC REQUIRED) +IF(MEINPROC_FOUND) + MESSAGE(STATUS "Program meinproc found (${MEINPROC_EXECUTABLE})") +ENDIF(MEINPROC_FOUND) + +# Check GCC for PCH support +SET(USE_PCH FALSE) +IF(WANT_PCH) + FIND_PACKAGE(PCHSupport) + IF(PCHSupport_FOUND) + SET(USE_PCH TRUE) + ADD_DEFINITIONS(-DUSE_PCH) + MESSAGE(STATUS "Enabling precompiled headers for GCC ${gcc_compiler_version}") + ENDIF(PCHSupport_FOUND) +ENDIF(WANT_PCH) + +# Check PTHREAD_MUTEX_RECURSIVE +INCLUDE(CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES( + "#include + int main(int argc, char **argv) { + pthread_mutexattr_t attr; + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + return 0; + }" PTHREAD_HAS_MUTEX_RECURSIVE) +IF(PTHREAD_HAS_MUTEX_RECURSIVE) + ADD_DEFINITIONS(-DHAVE_PTHREAD_MUTEX_RECURSIVE) +ENDIF(PTHREAD_HAS_MUTEX_RECURSIVE) +# End of PTHREAD_MUTEX_RECURSIVE Test + +SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -w -fexceptions -DNDEBUG -include tqt.h") +SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -Wall -fexceptions -DDEBUG -include tqt.h") +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -Wall -fexceptions -DDEBUG -include tqt.h") + +MESSAGE(STATUS "Rosegarden ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}") + +IF(WANT_DEBUG) + IF(WANT_FULLDBG) + MESSAGE(STATUS "Configured to compile including full debug information in the executables") + SET(CMAKE_BUILD_TYPE Debug CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) + ELSE(WANT_FULLDBG) + MESSAGE(STATUS "Configured to compile including debug information in the executables") + SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) + ENDIF(WANT_FULLDBG) +ELSE(WANT_DEBUG) + MESSAGE(STATUS "Configured to compile for release without debug information") + SET(CMAKE_BUILD_TYPE Release CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) +ENDIF(WANT_DEBUG) +MARK_AS_ADVANCED(CMAKE_BUILD_TYPE) + +# Warn the user if important libraries are missing +INCLUDE(UserWarnings) + +# Recurse into the "src" subdirectory. This does not actually +# cause another cmake executable to run. The same process will walk through +# the project's entire directory structure. +# Output directory will be "RGbuild/" +ADD_SUBDIRECTORY(src RGbuild) + +# Build and install the translations directory +ADD_SUBDIRECTORY(po RGbuild/po) + +# Build and install the documentation directory +ADD_SUBDIRECTORY(docs RGbuild/docs) + +# Install data files +ADD_SUBDIRECTORY(data RGbuild/data) + +# install some documents... +# INSTALL( FILES AUTHORS COPYING README TRANSLATORS INSTALL rosegarden.lsm +# DESTINATION share/doc/rosegarden-${VERSION} ) + +# create and install the version file +FILE(WRITE version.txt "${VERSION}\n") +INSTALL( FILES version.txt + DESTINATION ${KDE3DATADIR}/rosegarden ) + +# uninstall custom target +CONFIGURE_FILE( + "${CMAKE_SOURCE_DIR}/cmake_admin/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +ADD_CUSTOM_TARGET(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + +# Custom target trying to clean the CMake generated files +ADD_CUSTOM_TARGET ( distclean + COMMAND rm -f {,src/,po/,docs/,data/}CMakeCache.txt + COMMAND rm -f {,src/,po/,docs/,data/}cmake_install.cmake + COMMAND rm -f {,src/,po/,docs/,data/}cmake_uninstall.cmake + COMMAND rm -f {,src/,po/,docs/,data/}CPackConfig.cmake + COMMAND rm -f {,src/,po/,docs/,data/}CPackSourceConfig.cmake + COMMAND rm -f {,src/,po/,docs/,data/}install_manifest.txt + COMMAND rm -f {,src/,po/,docs/,data/}progress.make + COMMAND rm -f {,src/,po/,docs/,data/}rosegarden.spec + COMMAND rm -f {,src/,po/,docs/,data/}Makefile + COMMAND rm -rf {,src/,po/,docs/,data/}CMakeFiles + COMMAND rm -rf {,src/,po/,docs/,data/}_CPack_Packages + COMMAND rm -rf RGbuild/* + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) +ADD_DEPENDENCIES(distclean clean) + +# configure the RPM spec +CONFIGURE_FILE( + "${CMAKE_SOURCE_DIR}/rosegarden.spec.in" + "${CMAKE_SOURCE_DIR}/rosegarden.spec" + IMMEDIATE @ONLY) + +# tarball target +ADD_CUSTOM_TARGET ( tarball + COMMAND mkdir -p rosegarden-${VERSION} + COMMAND cp -r cmake_admin rosegarden-${VERSION} + COMMAND cp -r data rosegarden-${VERSION} + COMMAND cp -r docs rosegarden-${VERSION} + COMMAND cp -r po rosegarden-${VERSION} + COMMAND cp -r src rosegarden-${VERSION} + COMMAND cp CMakeLists.txt AUTHORS COPYING Doxyfile INSTALL README rosegarden.* TRANSLATORS rosegarden-${VERSION} + COMMAND tar -cj --exclude .svn --exclude gettext-0.10.35-kde -f rosegarden-${VERSION}.tar.bz2 rosegarden-${VERSION} + COMMAND rm -rf rosegarden-${VERSION} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..efe717d --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,217 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE ) + find_program( MSGFMT_EXECUTABLE msgfmt ) + if( NOT MSGFMT_EXECUTABLE ) + tde_message_fatal( "msgfmt program is required, but was not found on your system" ) + endif( ) +endif( ) + +# Initialize some variables +SET(HAVE_XFT FALSE) +SET(HAVE_ALSA FALSE) +SET(HAVE_JACK FALSE) +SET(HAVE_DSSI FALSE) +SET(HAVE_LIBLO FALSE) +SET(HAVE_LIBLRDF FALSE) +SET(HAVE_LADSPA FALSE) +SET(HAVE_LIRC FALSE) +SET(HAVE_FFTW3F FALSE) + +# Check for Xft +PKG_CHECK_MODULES(XFT xft>=2.1.0) +IF(XFT_FOUND) + ADD_DEFINITIONS(-DHAVE_XFT) + SET(HAVE_XFT TRUE) + SET(XFT_LIBS ${XFT_LIBRARIES}) + #MESSAGE("XFT_LIBS: ${XFT_LIBS}") + LIST(APPEND XFT_LIB_DIR ${XFT_LIBRARY_DIRS} ${XFT_LIBDIR}) + #MESSAGE("XFT_LIB_DIR: ${XFT_LIB_DIR}") + LIST(APPEND XFT_INC_DIR ${XFT_INCLUDE_DIRS} ${XFT_INCLUDEDIR}) + #MESSAGE("XFT_INC_DIR: ${XFT_INC_DIR}") +ENDIF(XFT_FOUND) + +IF(WANT_SOUND) + + # Check for ALSA 1.0 + PKG_CHECK_MODULES(ALSA REQUIRED alsa>=1.0) + IF(ALSA_FOUND) + SET(HAVE_ALSA TRUE) + ADD_DEFINITIONS(-DHAVE_ALSA) + SET(ALSA_LIBS ${ALSA_LIBRARIES}) + #MESSAGE("ALSA_LIBS: ${ALSA_LIBS}") + LIST(APPEND ALSA_LIB_DIR ${ALSA_LIBRARY_DIRS} ${ALSA_LIBDIR} ) + #MESSAGE("ALSA_LIB_DIR: ${ALSA_LIB_DIR}") + LIST(APPEND ALSA_INC_DIR ${ALSA_INCLUDE_DIRS} ${ALSA_INCLUDEDIR}) + #MESSAGE("ALSA_INC_DIR: ${ALSA_INC_DIR}") + ELSE(ALSA_FOUND) + MESSAGE(FATAL_ERROR "Please install the required package. Aborting") + ENDIF(ALSA_FOUND) + + IF(WANT_JACK) + PKG_CHECK_MODULES(JACK jack>=0.77) + IF(JACK_FOUND) + ADD_DEFINITIONS(-DHAVE_LIBJACK) + SET(HAVE_JACK TRUE) + SET(JACK_LIBS ${JACK_LIBRARIES}) + #MESSAGE("JACK_LIBS: ${JACK_LIBS}") + LIST(APPEND JACK_LIB_DIR ${JACK_LIBDIR} ${JACK_LIBRARY_DIRS}) + #MESSAGE("JACK_LIB_DIR: ${JACK_LIB_DIR}") + LIST(APPEND JACK_INC_DIR ${JACK_INCLUDEDIR} ${JACK_INCLUDE_DIRS}) + #MESSAGE("JACK_INC_DIR: ${JACK_INC_DIR}") + ENDIF(JACK_FOUND) + ENDIF(WANT_JACK) + + IF(WANT_DSSI) + PKG_CHECK_MODULES(DSSI dssi>=0.4) + IF(DSSI_FOUND) + ADD_DEFINITIONS(-DHAVE_DSSI) + SET(HAVE_DSSI TRUE) + LIST(APPEND DSSI_INC_DIR ${DSSI_INCLUDE_DIRS} ${DSSI_INCLUDEDIR}) + #MESSAGE("DSSI_INC_DIR: ${DSSI_INC_DIR}") + ENDIF(DSSI_FOUND) + ENDIF(WANT_DSSI) + + PKG_CHECK_MODULES(LIBLO liblo>=0.7) + IF(LIBLO_FOUND) + ADD_DEFINITIONS(-DHAVE_LIBLO) + SET(HAVE_LIBLO TRUE) + SET(LIBLO_LIBS ${LIBLO_LIBRARIES}) + #MESSAGE("LIBLO_LIBS: ${LIBLO_LIBS}") + LIST(APPEND LIBLO_LIB_DIR ${LIBLO_LIBDIR} ${LIBLO_LIBRARY_DIRS}) + #MESSAGE("LIBLO_LIB_DIR: ${LIBLO_LIB_DIR}") + LIST(APPEND LIBLO_INC_DIR ${LIBLO_INCLUDEDIR} ${LIBLO_INCLUDE_DIRS}) + #MESSAGE("LIBLO_INC_DIR: ${LIBLO_INC_DIR}") + ENDIF(LIBLO_FOUND) + + PKG_CHECK_MODULES(LRDF lrdf>=0.3) + IF(LRDF_FOUND) + SET(HAVE_LIBLRDF TRUE) + ADD_DEFINITIONS(-DHAVE_LIBLRDF) + SET(LRDF_LIBS ${LRDF_LIBRARIES}) + #MESSAGE("LRDF_LIBS: ${LRDF_LIBS}") + LIST(APPEND LRDF_LIB_DIR ${LRDF_LIBDIR} ${LRDF_LIBRARY_DIRS}) + #MESSAGE("LRDF_LIB_DIR: ${LRDF_LIB_DIR}") + LIST(APPEND LRDF_INC_DIR ${LRDF_INCLUDEDIR} ${LRDF_INCLUDE_DIRS}) + #MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}") + ENDIF(LRDF_FOUND) + + FIND_PACKAGE(LADSPA QUIET) + IF(LADSPA_FOUND) + SET(HAVE_LADSPA TRUE) + ADD_DEFINITIONS(-DHAVE_LADSPA) + SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR}) + MESSAGE(STATUS "Found LADSPA (${LADSPA_INC_DIR})") + ENDIF(LADSPA_FOUND) + +ENDIF(WANT_SOUND) + +PKG_CHECK_MODULES(FFTW3F REQUIRED fftw3f>=3.0.0) +IF(FFTW3F_FOUND) + ADD_DEFINITIONS(-DHAVE_FFTW3F) + SET(HAVE_FFTW3F TRUE) + SET(FFTW3F_LIBS ${FFTW3F_LIBRARIES}) + #MESSAGE("FFTW3F_LIBS: ${FFTW3F_LIBS}") + LIST(APPEND FFTW3F_LIB_DIR ${FFTW3F_LIBDIR} ${FFTW3F_LIBRARY_DIRS}) + #MESSAGE("FFTW3F_LIB_DIR: ${FFTW3F_LIB_DIR}") + LIST(APPEND FFTW3F_INC_DIR ${FFTW3F_INCLUDEDIR} ${FFTW3F_INCLUDE_DIRS}) + #MESSAGE("FFTW3F_INC_DIR: ${FFTW3F_INC_DIR}") +ELSE(FFTW3F_FOUND) + MESSAGE(FATAL_ERROR "Please install the required package. Aborting") +ENDIF(FFTW3F_FOUND) + +IF(WANT_LIRC) + FIND_PACKAGE(LIRC QUIET) + IF(LIRC_FOUND) + SET(HAVE_LIRC TRUE) + ADD_DEFINITIONS(-DHAVE_LIRC) + MESSAGE(STATUS "Found LIRC (${LIRC_LIBRARY})") + SET(LIRC_LIBS ${LIRC_LIBRARY}) + SET(LIRC_INC_DIR ${LIRC_INCLUDE_DIR}) + SET(LIRC_LIB_DIR ${LIRC_LIBRARY_DIR}) + #MESSAGE("LIRC_LIBS: ${LIRC_LIBS}") + #MESSAGE("LIRC_LIB_DIR: ${LIRC_LIB_DIR}") + #MESSAGE("LIRC_INC_DIR: ${LIRC_INC_DIR}") + ENDIF(LIRC_FOUND) +ENDIF(WANT_LIRC) + +FIND_PACKAGE(KDECONFIG) +IF(KDECONFIG_EXECUTABLE) + MESSAGE(STATUS "Program kde-config found (${KDECONFIG_EXECUTABLE})") + #MESSAGE("KDE3PREFIX: ${KDE3PREFIX}") +ENDIF(KDECONFIG_EXECUTABLE) + +FIND_PACKAGE(MEINPROC REQUIRED) +IF(MEINPROC_FOUND) + MESSAGE(STATUS "Program meinproc found (${MEINPROC_EXECUTABLE})") +ENDIF(MEINPROC_FOUND) + +# Check GCC for PCH support +SET(USE_PCH FALSE) +IF(WANT_PCH) + FIND_PACKAGE(PCHSupport) + IF(PCHSupport_FOUND) + SET(USE_PCH TRUE) + ADD_DEFINITIONS(-DUSE_PCH) + MESSAGE(STATUS "Enabling precompiled headers for GCC ${gcc_compiler_version}") + ENDIF(PCHSupport_FOUND) +ENDIF(WANT_PCH) + +# Check PTHREAD_MUTEX_RECURSIVE +INCLUDE(CheckCSourceCompiles) +CHECK_C_SOURCE_COMPILES( + "#include + int main(int argc, char **argv) { + pthread_mutexattr_t attr; + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + return 0; + }" PTHREAD_HAS_MUTEX_RECURSIVE) +IF(PTHREAD_HAS_MUTEX_RECURSIVE) + ADD_DEFINITIONS(-DHAVE_PTHREAD_MUTEX_RECURSIVE) +ENDIF(PTHREAD_HAS_MUTEX_RECURSIVE) +# End of PTHREAD_MUTEX_RECURSIVE Test + +SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -w -fexceptions -DNDEBUG -include tqt.h") +SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -Wall -fexceptions -DDEBUG -include tqt.h") +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -Wall -fexceptions -DDEBUG -include tqt.h") + +MESSAGE(STATUS "Rosegarden ${VERSION} will be built for install into ${CMAKE_INSTALL_PREFIX}") + +IF(WANT_DEBUG) + IF(WANT_FULLDBG) + MESSAGE(STATUS "Configured to compile including full debug information in the executables") + SET(CMAKE_BUILD_TYPE Debug CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) + ELSE(WANT_FULLDBG) + MESSAGE(STATUS "Configured to compile including debug information in the executables") + SET(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) + ENDIF(WANT_FULLDBG) +ELSE(WANT_DEBUG) + MESSAGE(STATUS "Configured to compile for release without debug information") + SET(CMAKE_BUILD_TYPE Release CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE) +ENDIF(WANT_DEBUG) +MARK_AS_ADVANCED(CMAKE_BUILD_TYPE) + +check_type_size( "int" SIZEOF_INT BUILTIN_TYPES_ONLY ) +check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY ) + +check_include_file( stdint.h HAVE_STDINT_H ) +check_include_file( systems.h HAVE_SYSTEMS_H ) +check_include_file( linux/inotify.h HAVE_INOTIFY ) + +check_function_exists( statvfs HAVE_STATVFS ) + +# common required stuff +find_package( TQt ) +find_package( TDE ) diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..d81a482 --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,5 @@ +#cmakedefine SIZEOF_INT @SIZEOF_INT@ +#cmakedefine SIZEOF_LONG @SIZEOF_LONG@ +#cmakedefine HAVE_STDINT_H 1 +#cmakedefine HAVE_SYSTEMS_H 1 +#cmakedefine HAVE_STATVFS 1 \ No newline at end of file diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index 1dfc834..bec89cf 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,9 +1,9 @@ # Data directory -SET(DATADIR ${KDE3DATADIR}/rosegarden) -SET(ICONDIR ${KDE3ICONDIR}) -SET(MIMEDIR ${KDE3MIMEDIR}/audio) -SET(MENUDIR ${KDE3MENUDIR}) +SET(DATADIR ${DATA_INSTALL_DIR}/rosegarden) +SET(ICONDIR ${ICON_INSTALL_DIR}) +SET(MIMEDIR ${MIME_INSTALL_DIR}/audio) +SET(MENUDIR ${XDG_MENU_INSTALL_DIR}) # Guitar chord files FILE(GLOB CHORD_FILES chords/*.xml) @@ -80,7 +80,7 @@ INSTALL(FILES ${PIXMAP_FILES} DESTINATION ${DATADIR}/pixmaps/toolbar) FILE(GLOB PIXMAP_FILES pixmaps/transport/*.xpm pixmaps/transport/*.png) INSTALL(FILES ${PIXMAP_FILES} DESTINATION ${DATADIR}/pixmaps/transport) -# Splash +# Splash INSTALL(FILES pixmaps/splash.png DESTINATION ${DATADIR}/pixmaps) # Examples @@ -114,12 +114,12 @@ SET(EXAMPLE_FILES examples/vivaldi-cs3mv2.rg examples/vivaldi_op44_11_1.rg ) -INSTALL(FILES ${EXAMPLE_FILES} DESTINATION ${DATADIR}/examples) +INSTALL(FILES ${EXAMPLE_FILES} DESTINATION ${DATADIR}/examples) INSTALL(FILES examples/autoload.rg DESTINATION ${DATADIR}) -# Library +# Library FILE(GLOB RGD_FILES library/*.rgd) INSTALL(FILES ${RGD_FILES} DESTINATION ${DATADIR}/library) # KDE LIRC Profile -INSTALL(FILES profile/rosegarden.profile.xml DESTINATION ${KDE3DATADIR}/profiles) +INSTALL(FILES profile/rosegarden.profile.xml DESTINATION ${DATA_INSTALL_DIR}/profiles) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt new file mode 100644 index 0000000..a8b8de4 --- /dev/null +++ b/doc/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_auto_add_subdirectories() diff --git a/docs/de/.gitignore b/doc/de/.gitignore similarity index 100% rename from docs/de/.gitignore rename to doc/de/.gitignore diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt new file mode 100644 index 0000000..eb6d853 --- /dev/null +++ b/doc/en/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION rosegarden ) diff --git a/docs/en/headers-and-unicode-lyrics.png b/doc/en/headers-and-unicode-lyrics.png similarity index 100% rename from docs/en/headers-and-unicode-lyrics.png rename to doc/en/headers-and-unicode-lyrics.png diff --git a/docs/en/index.docbook b/doc/en/index.docbook similarity index 100% rename from docs/en/index.docbook rename to doc/en/index.docbook diff --git a/docs/en/rg-audiofilemanager.png b/doc/en/rg-audiofilemanager.png similarity index 100% rename from docs/en/rg-audiofilemanager.png rename to doc/en/rg-audiofilemanager.png diff --git a/docs/en/rg-audiomixer.png b/doc/en/rg-audiomixer.png similarity index 100% rename from docs/en/rg-audiomixer.png rename to doc/en/rg-audiomixer.png diff --git a/docs/en/rg-bankeditor.png b/doc/en/rg-bankeditor.png similarity index 100% rename from docs/en/rg-bankeditor.png rename to doc/en/rg-bankeditor.png diff --git a/docs/en/rg-button-bar-time.png b/doc/en/rg-button-bar-time.png similarity index 100% rename from docs/en/rg-button-bar-time.png rename to doc/en/rg-button-bar-time.png diff --git a/docs/en/rg-button-from-end.png b/doc/en/rg-button-from-end.png similarity index 100% rename from docs/en/rg-button-from-end.png rename to doc/en/rg-button-from-end.png diff --git a/docs/en/rg-clefdialog.png b/doc/en/rg-clefdialog.png similarity index 100% rename from docs/en/rg-clefdialog.png rename to doc/en/rg-clefdialog.png diff --git a/docs/en/rg-coda.png b/doc/en/rg-coda.png similarity index 100% rename from docs/en/rg-coda.png rename to doc/en/rg-coda.png diff --git a/docs/en/rg-colours.png b/doc/en/rg-colours.png similarity index 100% rename from docs/en/rg-colours.png rename to doc/en/rg-colours.png diff --git a/docs/en/rg-cursors.png b/doc/en/rg-cursors.png similarity index 100% rename from docs/en/rg-cursors.png rename to doc/en/rg-cursors.png diff --git a/docs/en/rg-devicemanager.png b/doc/en/rg-devicemanager.png similarity index 100% rename from docs/en/rg-devicemanager.png rename to doc/en/rg-devicemanager.png diff --git a/docs/en/rg-eraser.png b/doc/en/rg-eraser.png similarity index 100% rename from docs/en/rg-eraser.png rename to doc/en/rg-eraser.png diff --git a/docs/en/rg-eventfilter.png b/doc/en/rg-eventfilter.png similarity index 100% rename from docs/en/rg-eventfilter.png rename to doc/en/rg-eventfilter.png diff --git a/docs/en/rg-eventlisteditor.png b/doc/en/rg-eventlisteditor.png similarity index 100% rename from docs/en/rg-eventlisteditor.png rename to doc/en/rg-eventlisteditor.png diff --git a/docs/en/rg-gridquantizer.png b/doc/en/rg-gridquantizer.png similarity index 100% rename from docs/en/rg-gridquantizer.png rename to doc/en/rg-gridquantizer.png diff --git a/docs/en/rg-guitarchorddialog.png b/doc/en/rg-guitarchorddialog.png similarity index 100% rename from docs/en/rg-guitarchorddialog.png rename to doc/en/rg-guitarchorddialog.png diff --git a/docs/en/rg-guitarchordeditordialog.png b/doc/en/rg-guitarchordeditordialog.png similarity index 100% rename from docs/en/rg-guitarchordeditordialog.png rename to doc/en/rg-guitarchordeditordialog.png diff --git a/docs/en/rg-ipb-audio.png b/doc/en/rg-ipb-audio.png similarity index 100% rename from docs/en/rg-ipb-audio.png rename to doc/en/rg-ipb-audio.png diff --git a/docs/en/rg-ipb-midi.png b/doc/en/rg-ipb-midi.png similarity index 100% rename from docs/en/rg-ipb-midi.png rename to doc/en/rg-ipb-midi.png diff --git a/docs/en/rg-ipb-synth.png b/doc/en/rg-ipb-synth.png similarity index 100% rename from docs/en/rg-ipb-synth.png rename to doc/en/rg-ipb-synth.png diff --git a/docs/en/rg-keysigdialog.png b/doc/en/rg-keysigdialog.png similarity index 100% rename from docs/en/rg-keysigdialog.png rename to doc/en/rg-keysigdialog.png diff --git a/docs/en/rg-loadpreset.png b/doc/en/rg-loadpreset.png similarity index 100% rename from docs/en/rg-loadpreset.png rename to doc/en/rg-loadpreset.png diff --git a/docs/en/rg-mainwindow.png b/doc/en/rg-mainwindow.png similarity index 100% rename from docs/en/rg-mainwindow.png rename to doc/en/rg-mainwindow.png diff --git a/docs/en/rg-markerloop.png b/doc/en/rg-markerloop.png similarity index 100% rename from docs/en/rg-markerloop.png rename to doc/en/rg-markerloop.png diff --git a/docs/en/rg-matrixview.png b/doc/en/rg-matrixview.png similarity index 100% rename from docs/en/rg-matrixview.png rename to doc/en/rg-matrixview.png diff --git a/docs/en/rg-metronome.png b/doc/en/rg-metronome.png similarity index 100% rename from docs/en/rg-metronome.png rename to doc/en/rg-metronome.png diff --git a/docs/en/rg-midifilter.png b/doc/en/rg-midifilter.png similarity index 100% rename from docs/en/rg-midifilter.png rename to doc/en/rg-midifilter.png diff --git a/docs/en/rg-midimixer.png b/doc/en/rg-midimixer.png similarity index 100% rename from docs/en/rg-midimixer.png rename to doc/en/rg-midimixer.png diff --git a/docs/en/rg-move.png b/doc/en/rg-move.png similarity index 100% rename from docs/en/rg-move.png rename to doc/en/rg-move.png diff --git a/docs/en/rg-notation-toolbars.png b/doc/en/rg-notation-toolbars.png similarity index 100% rename from docs/en/rg-notation-toolbars.png rename to doc/en/rg-notation-toolbars.png diff --git a/docs/en/rg-notationquantizer.png b/doc/en/rg-notationquantizer.png similarity index 100% rename from docs/en/rg-notationquantizer.png rename to doc/en/rg-notationquantizer.png diff --git a/docs/en/rg-notationtools.png b/doc/en/rg-notationtools.png similarity index 100% rename from docs/en/rg-notationtools.png rename to doc/en/rg-notationtools.png diff --git a/docs/en/rg-notationview-multipage.png b/doc/en/rg-notationview-multipage.png similarity index 100% rename from docs/en/rg-notationview-multipage.png rename to doc/en/rg-notationview-multipage.png diff --git a/docs/en/rg-notationview.png b/doc/en/rg-notationview.png similarity index 100% rename from docs/en/rg-notationview.png rename to doc/en/rg-notationview.png diff --git a/docs/en/rg-pastedialog.png b/doc/en/rg-pastedialog.png similarity index 100% rename from docs/en/rg-pastedialog.png rename to doc/en/rg-pastedialog.png diff --git a/docs/en/rg-pencil.png b/doc/en/rg-pencil.png similarity index 100% rename from docs/en/rg-pencil.png rename to doc/en/rg-pencil.png diff --git a/docs/en/rg-percussionmatrix.png b/doc/en/rg-percussionmatrix.png similarity index 100% rename from docs/en/rg-percussionmatrix.png rename to doc/en/rg-percussionmatrix.png diff --git a/docs/en/rg-plugin-dialog.png b/doc/en/rg-plugin-dialog.png similarity index 100% rename from docs/en/rg-plugin-dialog.png rename to doc/en/rg-plugin-dialog.png diff --git a/docs/en/rg-pluginbuttons.png b/doc/en/rg-pluginbuttons.png similarity index 100% rename from docs/en/rg-pluginbuttons.png rename to doc/en/rg-pluginbuttons.png diff --git a/docs/en/rg-plugineditorbutton.png b/doc/en/rg-plugineditorbutton.png similarity index 100% rename from docs/en/rg-plugineditorbutton.png rename to doc/en/rg-plugineditorbutton.png diff --git a/docs/en/rg-quickmarker.png b/doc/en/rg-quickmarker.png similarity index 100% rename from docs/en/rg-quickmarker.png rename to doc/en/rg-quickmarker.png diff --git a/docs/en/rg-rawnoteruler.png b/doc/en/rg-rawnoteruler.png similarity index 100% rename from docs/en/rg-rawnoteruler.png rename to doc/en/rg-rawnoteruler.png diff --git a/docs/en/rg-resize.png b/doc/en/rg-resize.png similarity index 100% rename from docs/en/rg-resize.png rename to doc/en/rg-resize.png diff --git a/docs/en/rg-segmentparameterbox.png b/doc/en/rg-segmentparameterbox.png similarity index 100% rename from docs/en/rg-segmentparameterbox.png rename to doc/en/rg-segmentparameterbox.png diff --git a/docs/en/rg-segno.png b/doc/en/rg-segno.png similarity index 100% rename from docs/en/rg-segno.png rename to doc/en/rg-segno.png diff --git a/docs/en/rg-select.png b/doc/en/rg-select.png similarity index 100% rename from docs/en/rg-select.png rename to doc/en/rg-select.png diff --git a/docs/en/rg-split.png b/doc/en/rg-split.png similarity index 100% rename from docs/en/rg-split.png rename to doc/en/rg-split.png diff --git a/docs/en/rg-synthpluginbuttons.png b/doc/en/rg-synthpluginbuttons.png similarity index 100% rename from docs/en/rg-synthpluginbuttons.png rename to doc/en/rg-synthpluginbuttons.png diff --git a/docs/en/rg-tempodialog.png b/doc/en/rg-tempodialog.png similarity index 100% rename from docs/en/rg-tempodialog.png rename to doc/en/rg-tempodialog.png diff --git a/docs/en/rg-temporuler.png b/doc/en/rg-temporuler.png similarity index 100% rename from docs/en/rg-temporuler.png rename to doc/en/rg-temporuler.png diff --git a/docs/en/rg-text-cursor.png b/doc/en/rg-text-cursor.png similarity index 100% rename from docs/en/rg-text-cursor.png rename to doc/en/rg-text-cursor.png diff --git a/docs/en/rg-textdialog.png b/doc/en/rg-textdialog.png similarity index 100% rename from docs/en/rg-textdialog.png rename to doc/en/rg-textdialog.png diff --git a/docs/en/rg-timesigdialog.png b/doc/en/rg-timesigdialog.png similarity index 100% rename from docs/en/rg-timesigdialog.png rename to doc/en/rg-timesigdialog.png diff --git a/docs/en/rg-trackbutton-instrumentmenu.png b/doc/en/rg-trackbutton-instrumentmenu.png similarity index 100% rename from docs/en/rg-trackbutton-instrumentmenu.png rename to doc/en/rg-trackbutton-instrumentmenu.png diff --git a/docs/en/rg-trackbutton-instruments.png b/doc/en/rg-trackbutton-instruments.png similarity index 100% rename from docs/en/rg-trackbutton-instruments.png rename to doc/en/rg-trackbutton-instruments.png diff --git a/docs/en/rg-trackbutton-labels.png b/doc/en/rg-trackbutton-labels.png similarity index 100% rename from docs/en/rg-trackbutton-labels.png rename to doc/en/rg-trackbutton-labels.png diff --git a/docs/en/rg-trackbuttons.png b/doc/en/rg-trackbuttons.png similarity index 100% rename from docs/en/rg-trackbuttons.png rename to doc/en/rg-trackbuttons.png diff --git a/docs/en/rg-trackeditor.png b/doc/en/rg-trackeditor.png similarity index 100% rename from docs/en/rg-trackeditor.png rename to doc/en/rg-trackeditor.png diff --git a/docs/en/rg-trackparameterbox.png b/doc/en/rg-trackparameterbox.png similarity index 100% rename from docs/en/rg-trackparameterbox.png rename to doc/en/rg-trackparameterbox.png diff --git a/docs/en/rg-transport.png b/doc/en/rg-transport.png similarity index 100% rename from docs/en/rg-transport.png rename to doc/en/rg-transport.png diff --git a/docs/en/rg-triggersegment.png b/doc/en/rg-triggersegment.png similarity index 100% rename from docs/en/rg-triggersegment.png rename to doc/en/rg-triggersegment.png diff --git a/docs/en/rg-tupletdialog.png b/doc/en/rg-tupletdialog.png similarity index 100% rename from docs/en/rg-tupletdialog.png rename to doc/en/rg-tupletdialog.png diff --git a/docs/en/rg-useornament.png b/doc/en/rg-useornament.png similarity index 100% rename from docs/en/rg-useornament.png rename to doc/en/rg-useornament.png diff --git a/docs/en/tips b/doc/en/tips similarity index 100% rename from docs/en/tips rename to doc/en/tips diff --git a/docs/en/transpose-by-interval.png b/doc/en/transpose-by-interval.png similarity index 100% rename from docs/en/transpose-by-interval.png rename to doc/en/transpose-by-interval.png diff --git a/doc/es/CMakeLists.txt b/doc/es/CMakeLists.txt new file mode 100644 index 0000000..eb6d853 --- /dev/null +++ b/doc/es/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION rosegarden ) diff --git a/docs/es/index.docbook b/doc/es/index.docbook similarity index 100% rename from docs/es/index.docbook rename to doc/es/index.docbook diff --git a/doc/ja/CMakeLists.txt b/doc/ja/CMakeLists.txt new file mode 100644 index 0000000..eb6d853 --- /dev/null +++ b/doc/ja/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION rosegarden ) diff --git a/docs/ja/index.docbook b/doc/ja/index.docbook similarity index 100% rename from docs/ja/index.docbook rename to doc/ja/index.docbook diff --git a/doc/sv/CMakeLists.txt b/doc/sv/CMakeLists.txt new file mode 100644 index 0000000..eb6d853 --- /dev/null +++ b/doc/sv/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION rosegarden ) diff --git a/docs/sv/index.docbook b/doc/sv/index.docbook similarity index 100% rename from docs/sv/index.docbook rename to doc/sv/index.docbook diff --git a/docs/sv/rg-audiofilemanager.png b/doc/sv/rg-audiofilemanager.png similarity index 100% rename from docs/sv/rg-audiofilemanager.png rename to doc/sv/rg-audiofilemanager.png diff --git a/docs/sv/rg-audiomixer.png b/doc/sv/rg-audiomixer.png similarity index 100% rename from docs/sv/rg-audiomixer.png rename to doc/sv/rg-audiomixer.png diff --git a/docs/sv/rg-bankeditor.png b/doc/sv/rg-bankeditor.png similarity index 100% rename from docs/sv/rg-bankeditor.png rename to doc/sv/rg-bankeditor.png diff --git a/docs/sv/rg-clefdialog.png b/doc/sv/rg-clefdialog.png similarity index 100% rename from docs/sv/rg-clefdialog.png rename to doc/sv/rg-clefdialog.png diff --git a/docs/sv/rg-colours.png b/doc/sv/rg-colours.png similarity index 100% rename from docs/sv/rg-colours.png rename to doc/sv/rg-colours.png diff --git a/docs/sv/rg-devicemanager.png b/doc/sv/rg-devicemanager.png similarity index 100% rename from docs/sv/rg-devicemanager.png rename to doc/sv/rg-devicemanager.png diff --git a/docs/sv/rg-eventlisteditor.png b/doc/sv/rg-eventlisteditor.png similarity index 100% rename from docs/sv/rg-eventlisteditor.png rename to doc/sv/rg-eventlisteditor.png diff --git a/docs/sv/rg-gridquantizer.png b/doc/sv/rg-gridquantizer.png similarity index 100% rename from docs/sv/rg-gridquantizer.png rename to doc/sv/rg-gridquantizer.png diff --git a/docs/sv/rg-ipb-audio.png b/doc/sv/rg-ipb-audio.png similarity index 100% rename from docs/sv/rg-ipb-audio.png rename to doc/sv/rg-ipb-audio.png diff --git a/docs/sv/rg-ipb-midi.png b/doc/sv/rg-ipb-midi.png similarity index 100% rename from docs/sv/rg-ipb-midi.png rename to doc/sv/rg-ipb-midi.png diff --git a/docs/sv/rg-ipb-synth.png b/doc/sv/rg-ipb-synth.png similarity index 100% rename from docs/sv/rg-ipb-synth.png rename to doc/sv/rg-ipb-synth.png diff --git a/docs/sv/rg-keysigdialog.png b/doc/sv/rg-keysigdialog.png similarity index 100% rename from docs/sv/rg-keysigdialog.png rename to doc/sv/rg-keysigdialog.png diff --git a/docs/sv/rg-mainwindow.png b/doc/sv/rg-mainwindow.png similarity index 100% rename from docs/sv/rg-mainwindow.png rename to doc/sv/rg-mainwindow.png diff --git a/docs/sv/rg-matrixview.png b/doc/sv/rg-matrixview.png similarity index 100% rename from docs/sv/rg-matrixview.png rename to doc/sv/rg-matrixview.png diff --git a/docs/sv/rg-metronome.png b/doc/sv/rg-metronome.png similarity index 100% rename from docs/sv/rg-metronome.png rename to doc/sv/rg-metronome.png diff --git a/docs/sv/rg-midifilter.png b/doc/sv/rg-midifilter.png similarity index 100% rename from docs/sv/rg-midifilter.png rename to doc/sv/rg-midifilter.png diff --git a/docs/sv/rg-midimixer.png b/doc/sv/rg-midimixer.png similarity index 100% rename from docs/sv/rg-midimixer.png rename to doc/sv/rg-midimixer.png diff --git a/docs/sv/rg-notationquantizer.png b/doc/sv/rg-notationquantizer.png similarity index 100% rename from docs/sv/rg-notationquantizer.png rename to doc/sv/rg-notationquantizer.png diff --git a/docs/sv/rg-notationview-multipage.png b/doc/sv/rg-notationview-multipage.png similarity index 100% rename from docs/sv/rg-notationview-multipage.png rename to doc/sv/rg-notationview-multipage.png diff --git a/docs/sv/rg-notationview.png b/doc/sv/rg-notationview.png similarity index 100% rename from docs/sv/rg-notationview.png rename to doc/sv/rg-notationview.png diff --git a/docs/sv/rg-pastedialog.png b/doc/sv/rg-pastedialog.png similarity index 100% rename from docs/sv/rg-pastedialog.png rename to doc/sv/rg-pastedialog.png diff --git a/docs/sv/rg-plugin-dialog.png b/doc/sv/rg-plugin-dialog.png similarity index 100% rename from docs/sv/rg-plugin-dialog.png rename to doc/sv/rg-plugin-dialog.png diff --git a/docs/sv/rg-pluginbuttons.png b/doc/sv/rg-pluginbuttons.png similarity index 100% rename from docs/sv/rg-pluginbuttons.png rename to doc/sv/rg-pluginbuttons.png diff --git a/docs/sv/rg-plugineditorbutton.png b/doc/sv/rg-plugineditorbutton.png similarity index 100% rename from docs/sv/rg-plugineditorbutton.png rename to doc/sv/rg-plugineditorbutton.png diff --git a/docs/sv/rg-segmentparameterbox.png b/doc/sv/rg-segmentparameterbox.png similarity index 100% rename from docs/sv/rg-segmentparameterbox.png rename to doc/sv/rg-segmentparameterbox.png diff --git a/docs/sv/rg-synthpluginbuttons.png b/doc/sv/rg-synthpluginbuttons.png similarity index 100% rename from docs/sv/rg-synthpluginbuttons.png rename to doc/sv/rg-synthpluginbuttons.png diff --git a/docs/sv/rg-tempodialog.png b/doc/sv/rg-tempodialog.png similarity index 100% rename from docs/sv/rg-tempodialog.png rename to doc/sv/rg-tempodialog.png diff --git a/docs/sv/rg-timesigdialog.png b/doc/sv/rg-timesigdialog.png similarity index 100% rename from docs/sv/rg-timesigdialog.png rename to doc/sv/rg-timesigdialog.png diff --git a/docs/sv/rg-trackbutton-instruments.png b/doc/sv/rg-trackbutton-instruments.png similarity index 100% rename from docs/sv/rg-trackbutton-instruments.png rename to doc/sv/rg-trackbutton-instruments.png diff --git a/docs/sv/rg-trackbutton-labels.png b/doc/sv/rg-trackbutton-labels.png similarity index 100% rename from docs/sv/rg-trackbutton-labels.png rename to doc/sv/rg-trackbutton-labels.png diff --git a/docs/sv/rg-trackeditor.png b/doc/sv/rg-trackeditor.png similarity index 100% rename from docs/sv/rg-trackeditor.png rename to doc/sv/rg-trackeditor.png diff --git a/docs/sv/rg-transport.png b/doc/sv/rg-transport.png similarity index 100% rename from docs/sv/rg-transport.png rename to doc/sv/rg-transport.png diff --git a/docs/sv/rg-tupletdialog.png b/doc/sv/rg-tupletdialog.png similarity index 100% rename from docs/sv/rg-tupletdialog.png rename to doc/sv/rg-tupletdialog.png diff --git a/docs/sv/rosegarden.po b/doc/sv/rosegarden.po similarity index 100% rename from docs/sv/rosegarden.po rename to doc/sv/rosegarden.po diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt deleted file mode 100644 index 9d1ac8b..0000000 --- a/docs/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ - -ADD_DOCS(rosegarden en es ja sv) - -INSTALL(FILES en/tips DESTINATION ${KDE3DATADIR}/rosegarden) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index a653d59..c752e63 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -1,25 +1,17 @@ +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# -# Automatic discovery of sources -FILE(GLOB PO_FILES *.po) +file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} rosegarden.po ) -# DISABLED: explicit set of source files -# SET(PO_FILES -# ca.po -# cs.po -# cy.po -# de.po -# en_GB.po -# en.po -# es.po -# et.po -# fi.po -# fr.po -# it.po -# ja.po -# nl.po -# ru.po -# sv.po -# zh_CN.po -# ) - -ADD_TRANSLATIONS(rosegarden ${PO_FILES}) +foreach( _po ${po_files} ) + get_filename_component( _lang ${_po} PATH ) + tde_create_translation( FILES ${_po} LANG ${_lang} ) +endforeach( ) diff --git a/po/ca.po b/po/ca/rosegarden.po similarity index 100% rename from po/ca.po rename to po/ca/rosegarden.po diff --git a/po/cs.po b/po/cs/rosegarden.po similarity index 100% rename from po/cs.po rename to po/cs/rosegarden.po diff --git a/po/cy.po b/po/cy/rosegarden.po similarity index 100% rename from po/cy.po rename to po/cy/rosegarden.po diff --git a/po/de.po b/po/de/rosegarden.po similarity index 100% rename from po/de.po rename to po/de/rosegarden.po diff --git a/po/en.po b/po/en/rosegarden.po similarity index 100% rename from po/en.po rename to po/en/rosegarden.po diff --git a/po/en_GB.po b/po/en_GB/rosegarden.po similarity index 100% rename from po/en_GB.po rename to po/en_GB/rosegarden.po diff --git a/po/es.po b/po/es/rosegarden.po similarity index 100% rename from po/es.po rename to po/es/rosegarden.po diff --git a/po/et.po b/po/et/rosegarden.po similarity index 100% rename from po/et.po rename to po/et/rosegarden.po diff --git a/po/eu.po b/po/eu/rosegarden.po similarity index 100% rename from po/eu.po rename to po/eu/rosegarden.po diff --git a/po/fi.po b/po/fi/rosegarden.po similarity index 100% rename from po/fi.po rename to po/fi/rosegarden.po diff --git a/po/fr.po b/po/fr/rosegarden.po similarity index 100% rename from po/fr.po rename to po/fr/rosegarden.po diff --git a/po/it.po b/po/it/rosegarden.po similarity index 100% rename from po/it.po rename to po/it/rosegarden.po diff --git a/po/ja.po b/po/ja/rosegarden.po similarity index 100% rename from po/ja.po rename to po/ja/rosegarden.po diff --git a/po/messages.sh b/po/messages.sh deleted file mode 100755 index 51bbd88..0000000 --- a/po/messages.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# Based on KDE messages.sh by Thomas Nagy -# Inspired by Makefile.common from coolo -# This script is used to update the .po files. - -# To update the translations, you will need a specific gettext -# patched for kde and a lot of patience, tenacity, luck, time .. - -# I guess one should only update the .po files when all .cpp files -# are generated (after a make or scons) - -if [ -z "$KDE_GETTEXT_BIN" ]; then - if [ -f ./xgettext ] && ./xgettext --help 2>&1 | grep -q extract; then - KDE_GETTEXT_BIN=. - elif [ -d /opt/gettext-kde/bin ]; then - KDE_GETTEXT_BIN=/opt/gettext-kde/bin - fi -fi -if [ ! -d "$KDE_GETTEXT_BIN" ]; then - echo 1>&2 - echo "WARNING: Environment variable KDE_GETTEXT_BIN must be set" 1>&2 - echo "such that the KDE patched version of gettext is found in " 1>&2 - echo "KDE_GETTEXT_BIN/." 1>&2 - echo 1>&2 - echo "Falling back to default gettext, but plural translations " 1>&2 - echo "will probably be wrong." 1>&2 - echo 1>&2 - echo "See ftp://ftp.kde.org/devel/gettext-kde/ for the patched gettext." 1>&2 - echo 1>&2 -else - KDE_GETTEXT_PATH=${KDE_GETTEXT_BIN}/ -fi - -SRCDIR=../src # srcdir is the directory containing the source code -TIPSDIR=../docs/en # tipsdir is the directory containing the tips -DATADIR=../data # datadir is the directory containing fonts/mappings & styles - -KDEDIR=`kde-config --prefix` -EXTRACTRC=extractrc # from tdesdk-scripts (on Debian Sarge) -KDEPOT=$KDEDIR/include/kde.pot -if [ ! -f "$KDEPOT" ] && [ -f /usr/include/kde/kde.pot ]; then - KDEPOT=/usr/include/kde/kde.pot -fi -XGETTEXT="${KDE_GETTEXT_PATH}xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale -x $KDEPOT " - -## check that kde.pot is available -if ! test -e $KDEPOT; then - echo "$KDEPOT does not exist, there is something wrong with your installation!" - XGETTEXT="${KDE_GETTEXT_PATH}xgettext -C -ki18n -ktr2i18n -kI18N_NOOP -ktranslate -kaliasLocale " -fi - -> rc.cpp - -## extract the strings -echo "extracting the strings" - -# process the .ui and .rc files -$EXTRACTRC `find $SRCDIR -iname *.rc` >> rc.cpp -$EXTRACTRC `find $SRCDIR -iname *.ui` >> rc.cpp -echo -e 'i18n("_: NAME OF TRANSLATORS\\n"\n"Your names")\ni18n("_: EMAIL OF TRANSLATORS\\n"\n"Your emails")' > $SRCDIR/_translatorinfo.cpp - -# process the tips - $SRCDIR is supposed to be where the tips are living -pushd $TIPSDIR; preparetips >tips.cpp; popd - -# process the fonts mapping attributes -FONTSDIR=$DATADIR/fonts/mappings -pushd $FONTSDIR -cat *.xml | perl -e 'while () { if(/(encoding name|origin|copyright|mapped-by|type)\s*=\s*\"(.*)\"/) { print "i18n(\"$2\")\;\n";} }' > fonts.cpp -popd - -# process the note head style names -STYLEDIR=$DATADIR/styles -pushd $STYLEDIR -ls *.xml | perl -e 'while () { if(/(.*)\.xml/) { print "i18n(\"$1\")\;\n";} }' > styles.cpp -popd - -# extract the strings -$XGETTEXT `find $SRCDIR \( -name "*.cpp" -o -name "*.h" \)` rc.cpp $TIPSDIR/tips.cpp $FONTSDIR/fonts.cpp $STYLEDIR/styles.cpp -o tmp.pot - -# remove the intermediate files -rm -f $TIPSDIR/tips.cpp -rm -f $FONTSDIR/fonts.cpp -rm -f $STYLEDIR/styles.cpp -rm -f rc.cpp -rm -f $SRCDIR/_translatorinfo.cpp - -## now merge the .po files .. -echo "merging the .po files" - -for i in `ls *.po`; do - echo $i - msgmerge $i tmp.pot -o $i || exit 1 -done - -# replacing the old template by the new one -rm -f rosegarden.pot -mv tmp.pot rosegarden.pot - -## finished -echo "Done" diff --git a/po/nl.po b/po/nl/rosegarden.po similarity index 100% rename from po/nl.po rename to po/nl/rosegarden.po diff --git a/po/pl.po b/po/pl/rosegarden.po similarity index 100% rename from po/pl.po rename to po/pl/rosegarden.po diff --git a/po/ru.po b/po/ru/rosegarden.po similarity index 100% rename from po/ru.po rename to po/ru/rosegarden.po diff --git a/po/sv.po b/po/sv/rosegarden.po similarity index 100% rename from po/sv.po rename to po/sv/rosegarden.po diff --git a/po/xgettext b/po/xgettext deleted file mode 100755 index 1308a2e..0000000 Binary files a/po/xgettext and /dev/null differ diff --git a/po/zh_CN.po b/po/zh_CN/rosegarden.po similarity index 100% rename from po/zh_CN.po rename to po/zh_CN/rosegarden.po diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 63ae687..d3b652b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,221 +1,152 @@ -IF(NOT ROSEGARDEN_SOURCE_DIR) - MESSAGE(FATAL_ERROR "You need to run cmake or ccmake at the root directory") -ENDIF(NOT ROSEGARDEN_SOURCE_DIR) - -IF(USE_PCH) - ADD_PRECOMPILED_HEADER(precompiled_headers misc/stableheaders.h) -ENDIF(USE_PCH) - -LINK_DIRECTORIES( - ${KDE3_LIB_DIR} - ${ALSA_LIB_DIR} - ${JACK_LIB_DIR} - ${XFT_LIB_DIR} - ${LIBLO_LIB_DIR} - ${LRDF_LIB_DIR} - ${LIRC_LIB_DIR} - ${FFTW3F_LIB_DIR} +################################################# +# +# (C) 2011 Timothy Pearson +# kb9vqf (AT) pearsoncomputing.net +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/src + ${CMAKE_SOURCE_DIR}/src + ${ALSA_INC_DIR} + ${JACK_INC_DIR} + ${XFT_INC_DIR} + ${DSSI_INC_DIR} + ${LIBLO_INC_DIR} + ${LADSPA_INC_DIR} + ${LRDF_INC_DIR} + ${LIRC_INC_DIR} + ${FFTW3F_INC_DIR} ) -INCLUDE_DIRECTORIES(AFTER - ${QT_INCLUDE_DIR} - ${KDE3_INCLUDE_DIR} - ${ALSA_INC_DIR} - ${JACK_INC_DIR} - ${XFT_INC_DIR} - ${DSSI_INC_DIR} - ${LIBLO_INC_DIR} - ${LADSPA_INC_DIR} - ${LRDF_INC_DIR} - ${LIRC_INC_DIR} - ${FFTW3F_INC_DIR} - base +link_directories( + ${TQT_LIBRARY_DIRS} + ${TDE_LIBRARY_DIR} + ${ALSA_LIB_DIR} + ${JACK_LIB_DIR} + ${XFT_LIB_DIR} + ${LIBLO_LIB_DIR} + ${LRDF_LIB_DIR} + ${LIRC_LIB_DIR} + ${FFTW3F_LIB_DIR} ) -SET(CMAKE_INCLUDE_PATH ".") +##### include cmake file lists ################## + +set( CMAKE_INCLUDE_PATH "." ) # Common sources -INCLUDE(BaseFileList.txt) -INCLUDE(MiscFileList.txt) +include( BaseFileList.txt ) +include( MiscFileList.txt ) # Sound sources -INCLUDE(SoundFileList.txt) +include( SoundFileList.txt ) -KDE3_AUTOMOC(${common_sound_SRCS}) +# sequencer executable +include( SequencerFileList.txt ) -ADD_LIBRARY(RosegardenCommon STATIC - ${misc_SRCS} - ${base_SRCS} - ${common_sound_SRCS} -) +# gui executable +include( GUIFileList.txt ) -TARGET_LINK_LIBRARIES(RosegardenCommon - dl -) +##### other data ################################ -IF(USE_PCH) - ADD_DEPENDENCIES(RosegardenCommon precompiled_headers) -ENDIF(USE_PCH) +# Install helper scripts +install( PROGRAMS + helpers/rosegarden-lilypondview + helpers/rosegarden-project-package + helpers/rosegarden-audiofile-importer + DESTINATION ${BIN_INSTALL_DIR} ) -# sequencer executable -INCLUDE(SequencerFileList.txt) +# Install GUI resource files +file( GLOB RC_FILES gui/ui/*.rc ) +install( FILES ${RC_FILES} DESTINATION ${DATA_INSTALL_DIR}/rosegarden ) -IF(WANT_SOUND) - SET(snd_SRCS ${sound_SRCS}) -ELSE(WANT_SOUND) - SET(snd_SRCS ${nosnd_SRCS}) -ENDIF(WANT_SOUND) -KDE3_ADD_DCOP_SKELS(sequencer_SRCS ${seq_dcop_SRCS}) -KDE3_ADD_DCOP_STUBS(sequencer_SRCS ${seq_dcop_SRCS}) -KDE3_AUTOMOC(${sequencer_SRCS}) +##### RosegardenCommon ############################## -KDE3_ADD_EXECUTABLE(rosegardensequencer - ${snd_SRCS} - ${sequencer_SRCS} +tde_add_library( RosegardenCommon STATIC AUTOMOC + SOURCES ${${misc_SRCS} ${base_SRCS} ${common_sound_SRCS}} + LINK dl + DESTINATION ${LIB_INSTALL_DIR} ) -IF(USE_PCH) - ADD_DEPENDENCIES(rosegardensequencer precompiled_headers) -ENDIF(USE_PCH) - -TARGET_LINK_LIBRARIES(rosegardensequencer - dl - ${QT_AND_TDECORE_LIBS} - ${ALSA_LIBS} - ${JACK_LIBS} - ${LIBLO_LIBS} - ${LRDF_LIBS} - ${FFTW3F_LIBS} - tdeui - RosegardenCommon -) -# gui executable -INCLUDE(GUIFileList.txt) - -KDE3_ADD_DCOP_SKELS(gui_SRCS ${gui_dcop_SRCS}) -KDE3_ADD_DCOP_STUBS(gui_SRCS ${gui_dcop_SRCS}) -KDE3_ADD_UI_FILES(gui_SRCS ${ui_SRCS}) -KDE3_AUTOMOC(${gui_SRCS}) -KDE3_AUTOMOC(${segmentcanvas_SRCS}) -KDE3_AUTOMOC(${commands_SRCS}) -KDE3_AUTOMOC(${document_SRCS}) - -ADD_LIBRARY(RosegardenExtended STATIC - ${document_SRCS} - ${gui_SRCS} -) +##### rosegardensequencer ########################### -TARGET_LINK_LIBRARIES(RosegardenExtended - dl - lo -) +if( WANT_SOUND ) + set( snd_SRCS ${sound_SRCS} ) +else( WANT_SOUND ) + set( snd_SRCS ${nosnd_SRCS} ) +endif( WANT_SOUND ) -ADD_LIBRARY(RosegardenCommands STATIC - ${commands_SRCS} +tde_add_executable( rosegardensequencer AUTOMOC + SOURCES ${${seq_dcop_SRCS} ${snd_SRCS} ${sequencer_SRCS}} + LINK dl tdecore-shared ${ALSA_LIBS} ${JACK_LIBS} ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} tdeui-shared RosegardenCommon + DESTINATION ${BIN_INSTALL_DIR} ) -IF(USE_PCH) - ADD_DEPENDENCIES(RosegardenExtended precompiled_headers) -ENDIF(USE_PCH) -IF(USE_PCH) - ADD_DEPENDENCIES(RosegardenCommands precompiled_headers) -ENDIF(USE_PCH) +##### RosegardenExtended ############################ -ADD_LIBRARY(RosegardenSegmentCanvas STATIC - ${segmentcanvas_SRCS} +tde_add_library( RosegardenExtended STATIC AUTOMOC + SOURCES ${${document_SRCS} ${gui_SRCS} ${gui_dcop_SRCS} ${ui_SRCS}} + LINK dl lo + DESTINATION ${LIB_INSTALL_DIR} ) -IF(USE_PCH) - ADD_DEPENDENCIES(RosegardenSegmentCanvas precompiled_headers) -ENDIF(USE_PCH) +##### RosegardenCommands ############################ + +tde_add_library( RosegardenCommands STATIC AUTOMOC + SOURCES ${${commands_SRCS}} +# LINK dl + DESTINATION ${LIB_INSTALL_DIR} +) -KDE3_ADD_EXECUTABLE(rosegarden - #${commands_SRCS} - #${document_SRCS} - #${gui_SRCS} - #${segmentcanvas_SRCS} - gui/application/main.cpp +##### RosegardenSegmentCanvas ####################### + +tde_add_library( RosegardenSegmentCanvas STATIC AUTOMOC + SOURCES ${${segmentcanvas_SRCS}} +# LINK dl + DESTINATION ${LIB_INSTALL_DIR} ) -IF(USE_PCH) - ADD_DEPENDENCIES(rosegarden precompiled_headers) -ENDIF(USE_PCH) - -TARGET_LINK_LIBRARIES(rosegarden - dl - lo - ${QT_AND_TDECORE_LIBS} - ${LIBLO_LIBS} - ${LRDF_LIBS} - ${FFTW3F_LIBS} - ${XFT_LIBS} - ${LIRC_LIBS} - ${JACK_LIBS} - kio - tdeui - tdeprint - RosegardenExtended - RosegardenSegmentCanvas - RosegardenCommands - RosegardenCommon + +##### rosegarden #################################### + +tde_add_executable( rosegarden AUTOMOC + SOURCES ${gui/application/main.cpp} + LINK dl lo tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} kio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon + DESTINATION ${BIN_INSTALL_DIR} ) -# Install targets -INSTALL(TARGETS rosegarden rosegardensequencer - RUNTIME DESTINATION ${KDE3EXECDIR} ) +if( WANT_TEST ) + include( TestFileList.txt ) -# Install helper scripts -INSTALL(PROGRAMS - helpers/rosegarden-lilypondview - helpers/rosegarden-project-package - helpers/rosegarden-audiofile-importer - DESTINATION ${KDE3EXECDIR} ) + CREATE_TEST_SOURCELIST(RosegardenTest + RosegardenTestDriver.cpp + ${tests_SRCS} +# base/test/transpose.cpp +# base/test/segmenttransposecommand.cpp + ) -# Install GUI resource files -FILE(GLOB RC_FILES gui/ui/*.rc) -INSTALL(FILES ${RC_FILES} - DESTINATION ${KDE3DATADIR}/rosegarden ) - -IF(WANT_TEST) - INCLUDE(TestFileList.txt) - - CREATE_TEST_SOURCELIST(RosegardenTest - RosegardenTestDriver.cpp - ${tests_SRCS} -# base/test/transpose.cpp -# base/test/segmenttransposecommand.cpp - ) - - KDE3_ADD_EXECUTABLE(RosegardenTestDriver - RosegardenTestDriver.cpp - ${tests_SRCS} - ) - - TARGET_LINK_LIBRARIES(RosegardenTestDriver - dl - ${QT_AND_TDECORE_LIBS} - ${LIBLO_LIBS} - ${LRDF_LIBS} - ${FFTW3F_LIBS} - ${XFT_LIBS} - ${LIRC_LIBS} - ${JACK_LIBS} - kio - tdeui - tdeprint - RosegardenExtended - RosegardenSegmentCanvas - RosegardenCommands - RosegardenCommon - ) - FOREACH(currenttest ${tests_SRCS}) - GET_FILENAME_COMPONENT(TestName ${currenttest} NAME_WE) - ADD_TEST(test/${TestName} RosegardenTestDriver test/${TestName}) - ENDFOREACH(currenttest ${tests_SRCS}) -ENDIF(WANT_TEST) + tde_add_executable( RosegardenTestDriver AUTOMOC + SOURCES ${RosegardenTestDriver.cpp ${tests_SRCS}} + LINK dl lo tdecore-shared ${LIBLO_LIBS} ${LRDF_LIBS} ${FFTW3F_LIBS} ${XFT_LIBS} ${LIRC_LIBS} ${JACK_LIBS} kio-shared tdeui-shared tdeprint-shared RosegardenExtended RosegardenSegmentCanvas RosegardenCommands RosegardenCommon + DESTINATION ${BIN_INSTALL_DIR} +) + + FOREACH(currenttest ${tests_SRCS}) + GET_FILENAME_COMPONENT(TestName ${currenttest} NAME_WE) + ADD_TEST(test/${TestName} RosegardenTestDriver test/${TestName}) + ENDFOREACH(currenttest ${tests_SRCS}) +endif( WANT_TEST )