diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2019-05-31 13:33:35 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2019-05-31 13:33:35 +0300 |
commit | d5d6af1361ba73a24ceacd4a8b4346ece11b9a2e (patch) | |
tree | 8ec3bf400f21f53a2f6d1eb37bdd065b498829c0 /src | |
parent | 025a889f8892e3e0239c11865f53e91ae052fc51 (diff) |
Using system miniz in Linuxes.
Also enabling miniz large file support on gnu compilers.
Diffstat (limited to 'src')
-rw-r--r-- | src/miniz/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/miniz/CMakeLists.txt b/src/miniz/CMakeLists.txt index eba44a7ae..b2b1b4f32 100644 --- a/src/miniz/CMakeLists.txt +++ b/src/miniz/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.6) add_library(miniz INTERFACE) -if(NOT SLIC3R_STATIC) +if(NOT SLIC3R_STATIC OR CMAKE_SYSTEM_NAME STREQUAL "Linux") find_package(miniz 2.1 QUIET) endif() @@ -19,6 +19,10 @@ else() miniz.h ) + if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + target_compile_definitions(miniz_static PRIVATE _GNU_SOURCE) + endif() + target_link_libraries(miniz INTERFACE miniz_static) target_include_directories(miniz INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) |