Update miniz cmake
This commit is contained in:
parent
902bf682c0
commit
025a889f88
@ -3,20 +3,25 @@ cmake_minimum_required(VERSION 2.6)
|
|||||||
|
|
||||||
add_library(miniz INTERFACE)
|
add_library(miniz INTERFACE)
|
||||||
|
|
||||||
# find_package(Miniz 2.1 REQUIRED)
|
if(NOT SLIC3R_STATIC)
|
||||||
# if(Miniz_FOUND)
|
find_package(miniz 2.1 QUIET)
|
||||||
|
endif()
|
||||||
|
|
||||||
# target_link_libraries(miniz INTERFACE ${Miniz_LIBRARIES})
|
if(miniz_FOUND)
|
||||||
# target_include_directories(miniz INTERFACE ${Miniz_INCLUDE_DIRS})
|
|
||||||
|
message(STATUS "Using system miniz...")
|
||||||
|
target_link_libraries(miniz INTERFACE miniz::miniz)
|
||||||
|
|
||||||
# else()
|
else()
|
||||||
|
|
||||||
add_library(miniz_static STATIC
|
add_library(miniz_static STATIC
|
||||||
miniz.c
|
miniz.c
|
||||||
miniz.h
|
miniz.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries(miniz INTERFACE miniz_static)
|
||||||
|
target_include_directories(miniz INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
message(STATUS "Miniz NOT found in system, using bundled version...")
|
||||||
|
|
||||||
target_link_libraries(miniz INTERFACE miniz_static)
|
endif()
|
||||||
target_include_directories(miniz INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
|
|
||||||
# endif()
|
|
||||||
|
Loading…
Reference in New Issue
Block a user