MuseScore/mtest/CMakeLists.txt

107 lines
3.8 KiB
CMake
Raw Normal View History

2012-05-26 14:49:10 +02:00
#=============================================================================
# MuseScore
# Music Composition & Notation
# $Id:$
#
2013-04-25 21:37:19 +02:00
# Copyright (C) 2011-2013 Werner Schweer
2012-05-26 14:49:10 +02:00
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation and appearing in
# the file LICENSE.GPL
#=============================================================================
2013-05-16 12:48:23 +02:00
# set(CMAKE_VERBOSE_MAKEFILE ON)
2012-05-26 14:49:10 +02:00
enable_testing()
include_directories(
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}
)
2012-06-04 10:05:18 +02:00
if (OMR)
set(OMR_SRC ${PROJECT_SOURCE_DIR}/omr/importpdf.cpp)
endif (OMR)
2012-12-10 09:15:50 +01:00
QT4_WRAP_CPP (mtestMocs
${PROJECT_SOURCE_DIR}/mscore/qmlplugin.h
)
2012-05-26 14:49:10 +02:00
add_library(
testutils STATIC
2012-12-10 09:15:50 +01:00
${mtestMocs}
2012-05-26 14:49:10 +02:00
testutils.cpp
${PROJECT_SOURCE_DIR}/libmscore/mcursor.cpp
2013-05-07 13:36:21 +02:00
${PROJECT_SOURCE_DIR}/mscore/bb.cpp
2013-04-25 21:37:19 +02:00
${PROJECT_SOURCE_DIR}/mscore/capella.cpp
${PROJECT_SOURCE_DIR}/mscore/capxml.cpp
2012-09-27 21:34:36 +02:00
${PROJECT_SOURCE_DIR}/mscore/exportxml.cpp
2012-05-26 14:49:10 +02:00
${PROJECT_SOURCE_DIR}/mscore/importmidi.cpp
2013-08-01 08:17:21 +02:00
${PROJECT_SOURCE_DIR}/mscore/importgtp.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_operations.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_meter.cpp
2013-06-22 23:39:48 +02:00
${PROJECT_SOURCE_DIR}/mscore/importmidi_quant.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_tuplet.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_chord.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_data.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_fraction.cpp
2013-08-01 23:52:09 +02:00
${PROJECT_SOURCE_DIR}/mscore/importmidi_swing.cpp
2013-08-20 18:05:49 +02:00
${PROJECT_SOURCE_DIR}/mscore/importmidi_drum.cpp
2013-08-23 23:22:30 +02:00
${PROJECT_SOURCE_DIR}/mscore/importmidi_clef.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_lrhand.cpp
2013-09-07 20:57:23 +02:00
${PROJECT_SOURCE_DIR}/mscore/importmidi_lyrics.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_tie.cpp
${PROJECT_SOURCE_DIR}/mscore/importmidi_inner.cpp
2013-04-15 10:38:16 +02:00
${PROJECT_SOURCE_DIR}/mscore/exportmidi.cpp
2012-09-27 21:34:36 +02:00
${PROJECT_SOURCE_DIR}/mscore/importxml.cpp
${PROJECT_SOURCE_DIR}/mscore/importxmlfirstpass.cpp
2012-09-27 21:34:36 +02:00
${PROJECT_SOURCE_DIR}/mscore/musicxmlsupport.cpp
2012-12-10 09:15:50 +01:00
${PROJECT_SOURCE_DIR}/mscore/qmlplugin.cpp
${PROJECT_SOURCE_DIR}/mscore/shortcut.cpp
2013-04-25 21:37:19 +02:00
${PROJECT_SOURCE_DIR}/thirdparty/rtf2html/fmt_opts.cpp # required by capella.cpp and capxml.cpp
${PROJECT_SOURCE_DIR}/thirdparty/rtf2html/rtf2html.cpp # required by capella.cpp and capxml.cpp
${PROJECT_SOURCE_DIR}/thirdparty/rtf2html/rtf_keyword.cpp # required by capella.cpp and capxml.cpp
${PROJECT_SOURCE_DIR}/thirdparty/rtf2html/rtf_table.cpp # required by capella.cpp and capxml.cpp
2012-06-04 10:05:18 +02:00
${OMR_SRC}
2012-05-26 14:49:10 +02:00
omr
)
add_executable(
mtest
mtest.cpp
)
2012-09-27 21:34:36 +02:00
2012-05-26 14:49:10 +02:00
target_link_libraries(
mtest
${QT_LIBRARIES}
)
2013-02-15 14:50:03 +01:00
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
set(CMAKE_CXX_FLAGS_DEBUG "-std=gnu++0x -g")
2014-01-03 10:43:30 +01:00
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++0x -O2 -DNDEBUG -DQT_NO_DEBUG")
2013-02-15 14:50:03 +01:00
string(REPLACE ";" ";-I" INC "${QT_INCLUDES}")
2012-05-26 14:49:10 +02:00
set_target_properties (
testutils
PROPERTIES
2013-02-15 14:50:03 +01:00
COMPILE_FLAGS "-include all.h -D TESTROOT=\\\"${PROJECT_SOURCE_DIR}\\\" -g -Wall -Wextra"
2012-05-26 14:49:10 +02:00
)
2013-02-15 14:50:03 +01:00
# COMPILE_FLAGS "-include all.h -I ${INC} -D TESTROOT=\\\"${PROJECT_SOURCE_DIR}\\\" -g -Wall -Wextra"
2012-05-26 14:49:10 +02:00
add_custom_target(report
COMMAND ant -f ${PROJECT_SOURCE_DIR}/mtest/build.xml -Droot.dir=${PROJECT_BINARY_DIR}/mtest report
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/mtest"
)
2012-09-27 21:34:36 +02:00
2012-05-26 14:49:10 +02:00
add_custom_target(reporthtml
COMMAND ant -f ${PROJECT_SOURCE_DIR}/mtest/build.xml -Droot.dir=${PROJECT_BINARY_DIR}/mtest reporthtml
WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/mtest"
)
2013-08-01 08:17:21 +02:00
subdirs (libmscore importmidi capella biab musicxml guitarpro)
2012-05-26 14:49:10 +02:00
2012-06-04 10:05:18 +02:00
if (OMR)
subdirs(omr)
endif (OMR)