lib3mf: Apply patch to support C++14.

This commit is contained in:
Simon Hollingshead 2024-02-22 20:12:34 +00:00
parent a331a49cf7
commit f618da6e79
2 changed files with 20 additions and 0 deletions

View File

@ -12,6 +12,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-WMTTYYgpCIM86a6Jw8iah/YVXN9T5youzEieWL/d+Bc=";
};
patches = [ ./upgrade-to-cpp-14.patch ];
nativeBuildInputs = [ cmake ninja pkg-config ];
outputs = [ "out" "dev" ];

View File

@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f719beb7..a20f84eb8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -34,12 +34,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC
add_definitions(-DBUILD_DLL)
add_compile_options(-Wall)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O2")
elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
# using GCC
add_definitions(-DBUILD_DLL)
add_compile_options(-Wall)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -O2")
set(CMAKE_MACOSX_RPATH ON)
endif()