ports/editors/calligra/files/patch-CMakeLists.txt
Adriaan de Groot 6880d50e13 editors/calligra: switch to C++17 for upcoming poppler
This is a fix-it-before-it-breaks commit. Upcoming poppler update
requires C++17 in consumers, while Calligra was fixed on C++14.
There is no upstream release for this.

This is a mess: the upstream repo contains fixes, but they're
mostly committed as "fix warnings" and many commits combine C++17-
related fixes with other bits and pieces. As a result, there's
some direct upstream patches now in files/ and a big glommed-
together one put together from parts of other commits.

PR:	260956
2022-01-21 22:41:06 +01:00

33 lines
937 B
Text

- Use the C++ setting from "outside"; ECM uses modern C++ by default now
- Fix build against KDE Frameworks 5.83
(no longer ships find module, and the
cmake default one is used).
--- CMakeLists.txt.orig 2020-05-14 06:53:49 UTC
+++ CMakeLists.txt
@@ -104,13 +104,7 @@ if(NOT DEFINED RELEASE_BUILD)
endif()
message(STATUS "Release build: ${RELEASE_BUILD}")
-# use CPP-11
-if (CMAKE_VERSION VERSION_LESS "3.1")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-else ()
- set (CMAKE_CXX_STANDARD 11)
-endif ()
-
+ set (CMAKE_CXX_STANDARD 17)
############
#############
## Options ##
@@ -641,8 +634,8 @@ if(NOT WIN32 AND NOT APPLE)
)
endif()
-if(NOT FONTCONFIG_FOUND OR NOT FREETYPE_FOUND)
- set(FONTCONFIG_INCLUDE_DIR "")
+if(NOT Fontconfig_FOUND OR NOT FREETYPE_FOUND)
+ set(Fontconfig_INCLUDE_DIRS "")
set(FREETYPE_INCLUDE_DIRS "")
else()
add_definitions( -DSHOULD_BUILD_FONT_CONVERSION )