| 1 | From https://sources.debian.org/src/graphite2/1.3.14-11/debian/patches/non-linux.diff
|
| 2 | and https://github.com/silnrsi/graphite/pull/59
|
| 3 |
|
| 4 | From 9bfb76afa1d4036743902be9942f47db0642e330 Mon Sep 17 00:00:00 2001
|
| 5 | From: Mattia Rizzolo <[email protected]>
|
| 6 | Date: Mon, 19 Aug 2019 10:05:38 +0200
|
| 7 | Subject: [PATCH] Apply the same settings used for Linux also to k*BSD and GNU
|
| 8 | Hurd
|
| 9 |
|
| 10 | The patch was originally written by Pino Toscano for Debian back in 2014.
|
| 11 |
|
| 12 | Signed-off-by: Mattia Rizzolo <[email protected]>
|
| 13 | ---
|
| 14 | src/CMakeLists.txt | 2 +-
|
| 15 | tests/examples/CMakeLists.txt | 2 +-
|
| 16 | tests/vm/CMakeLists.txt | 2 +-
|
| 17 | 3 files changed, 3 insertions(+), 3 deletions(-)
|
| 18 |
|
| 19 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
| 20 | index b6ac26bf..7bcc4030 100644
|
| 21 | |
| 22 | |
| 23 | @@ -102,7 +102,7 @@ set_target_properties(graphite2 PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}"
|
| 24 | LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
|
| 25 | LT_VERSION_AGE ${GRAPHITE_API_AGE})
|
| 26 |
|
| 27 | -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
| 28 | +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "k.*BSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
|
| 29 | set_target_properties(graphite2 PROPERTIES
|
| 30 | COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden"
|
| 31 | LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}"
|
| 32 | diff --git a/tests/examples/CMakeLists.txt b/tests/examples/CMakeLists.txt
|
| 33 | index 103c78be..c4b78813 100644
|
| 34 | |
| 35 | |
| 36 | @@ -23,7 +23,7 @@ macro(test_example TESTNAME SRCFILE)
|
| 37 | set_tests_properties(${TESTNAME} PROPERTIES TIMEOUT 3)
|
| 38 | endmacro()
|
| 39 |
|
| 40 | -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
| 41 | +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "k.*BSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
|
| 42 | find_package(Freetype)
|
| 43 | if (${FREETYPE_FOUND})
|
| 44 | include_directories(${FREETYPE_INCLUDE_DIRS})
|
| 45 | diff --git a/tests/vm/CMakeLists.txt b/tests/vm/CMakeLists.txt
|
| 46 | index ee866de9..e94f710c 100644
|
| 47 | |
| 48 | |
| 49 | @@ -29,7 +29,7 @@ if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
| 50 | target_link_libraries(vm-test-direct vm-test-common)
|
| 51 | endif()
|
| 52 |
|
| 53 | -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
| 54 | +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "k.*BSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "GNU")
|
| 55 | add_definitions(-fno-rtti -fno-exceptions)
|
| 56 | if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
|
| 57 | add_definitions(-DNDEBUG -fomit-frame-pointer)
|