2a3fee9181c9917340e955afe2c80a2895916caf
[alioth/musescore.git] / debian / patches / upstream / mtest-fix-freetype-includes.diff
1 Description: Use system includes also for mtest
2 Author: mirabilos <tg@debian.org>
3 Forwarded: https://github.com/musescore/MuseScore/pull/4143
4 Applied-Upstream: master, commit:5d889d7f3, v3.1
5
6 --- a/mtest/CMakeLists.txt
7 +++ b/mtest/CMakeLists.txt
8 @@ -17,9 +17,14 @@ enable_testing()
9  include_directories(
10        ${PROJECT_BINARY_DIR}
11        ${PROJECT_SOURCE_DIR}
12 -      ${PROJECT_SOURCE_DIR}/thirdparty/freetype/include
13        )
14  
15 +if (USE_SYSTEM_FREETYPE)
16 +      include_directories(${FREETYPE_INCLUDE_DIRS})
17 +else (USE_SYSTEM_FREETYPE)
18 +      include_directories(${PROJECT_SOURCE_DIR}/thirdparty/freetype/include)
19 +endif (USE_SYSTEM_FREETYPE)
20 +
21  if (OMR)
22  set(OMR_SRC ${PROJECT_SOURCE_DIR}/omr/importpdf.cpp)
23  endif (OMR)
24 @@ -112,9 +117,14 @@ add_executable(
25  target_link_libraries(
26        mtest
27        ${QT_LIBRARIES}
28 -      mscore_freetype
29        )
30  
31 +if (USE_SYSTEM_FREETYPE)
32 +      target_link_libraries(mtest freetype)
33 +else (USE_SYSTEM_FREETYPE)
34 +      target_link_libraries(mtest mscore_freetype)
35 +endif (USE_SYSTEM_FREETYPE)
36 +
37  set(CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
38  
39  string(REPLACE ";" ";-I" INC "${QT_INCLUDES}")
40 --- a/mtest/cmake.inc
41 +++ b/mtest/cmake.inc
42 @@ -30,10 +30,15 @@ target_link_libraries(
43        qzip
44        z
45        ${QT_LIBRARIES}
46 -      mscore_freetype
47        z
48        )
49  
50 +if (USE_SYSTEM_FREETYPE)
51 +      target_link_libraries(${TARGET} freetype)
52 +else (USE_SYSTEM_FREETYPE)
53 +      target_link_libraries(${TARGET} mscore_freetype)
54 +endif (USE_SYSTEM_FREETYPE)
55 +
56  if (NOT MINGW AND NOT APPLE)
57     target_link_libraries(${TARGET}
58        dl