Use bundled Find{CURL,ZLIB}.cmake

This commit is contained in:
Nimish Telang 2023-03-19 16:03:04 -04:00 committed by Seth Hillbrand
parent a86aa6fc3e
commit f7bf3011fb
7 changed files with 8 additions and 50 deletions

View File

@ -750,14 +750,11 @@ include_directories( SYSTEM ${GLM_INCLUDE_DIR} )
# Find zlib library, required
#
find_package(ZLIB REQUIRED)
check_find_package_result( ZLIB_FOUND "ZLIB" )
include_directories( SYSTEM ${ZLIB_INCLUDE_DIRS} )
#
# Find CURL library, required
# Find libcurl, required
#
find_package( CURL REQUIRED )
include_directories( SYSTEM ${CURL_INCLUDE_DIRS} )
#
# Find Cairo library, required

View File

@ -1,39 +0,0 @@
#
# From CMake 2.6.1 + some path changes
#
# - Find zlib
# Find the native ZLIB includes and library
#
# ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
# ZLIB_LIBRARIES - List of libraries when using zlib.
# ZLIB_FOUND - True if zlib found.
IF(MSYS)
SET(ZLIB_DIR_SEARCH
c:/msys/1.0
)
ENDIF(MSYS)
IF (ZLIB_INCLUDE_DIR)
# Already in cache, be silent
SET(ZLIB_FIND_QUIETLY TRUE)
ENDIF (ZLIB_INCLUDE_DIR)
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h PATHS ${ZLIB_DIR_SEARCH}/local/include)
SET(ZLIB_NAMES z zlib zdll)
FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} PATHS ${ZLIB_DIR_SEARCH}/local/lib)
# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
IF(ZLIB_FOUND)
SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
ELSE(ZLIB_FOUND)
SET( ZLIB_LIBRARIES )
ENDIF(ZLIB_FOUND)
MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR )

View File

@ -231,7 +231,7 @@ endif()
#=====================================================================
if(wxWidgets_FIND_STYLE STREQUAL "win32")
# Useful common wx libs needed by almost all components.
set(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat)
set(wxWidgets_COMMON_LIBRARIES png tiff jpeg ZLIB::ZLIB regex expat)
# DEPRECATED: Use find_package(wxWidgets COMPONENTS mono) instead.
if(NOT wxWidgets_FIND_COMPONENTS)

View File

@ -492,7 +492,7 @@ target_link_libraries( common
# Database support needs these two
nanodbc # for now; maybe hoist out of common
Boost::locale
${CURL_LIBRARIES}
CURL::libcurl
${wxWidgets_LIBRARIES}
${EXTRA_LIBS}
# outline font support

View File

@ -632,7 +632,7 @@ target_link_libraries( pcbnew_kiface_objects
rectpack2d
gzip-hpp
Boost::boost
${ZLIB_LIBRARIES}
ZLIB::ZLIB
${OCC_LIBRARIES}
)

View File

@ -17,7 +17,7 @@ add_library( s3d_plugin_oce MODULE
loadmodel.cpp
)
target_link_libraries( s3d_plugin_oce kicad_3dsg ${OCC_LIBRARIES} ${wxWidgets_LIBRARIES} ${ZLIB_LIBRARIES} )
target_link_libraries( s3d_plugin_oce kicad_3dsg ${OCC_LIBRARIES} ${wxWidgets_LIBRARIES} ZLIB::ZLIB )
target_include_directories( s3d_plugin_oce PRIVATE
$<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>

View File

@ -65,7 +65,7 @@ add_library( s3d_plugin_vrml MODULE
x3d/x3d_transform.cpp
)
target_link_libraries( s3d_plugin_vrml kicad_3dsg ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${ZLIB_LIBRARIES} )
target_link_libraries( s3d_plugin_vrml kicad_3dsg ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ZLIB::ZLIB )
target_include_directories( s3d_plugin_vrml PRIVATE
$<TARGET_PROPERTY:gzip-hpp,INTERFACE_INCLUDE_DIRECTORIES>