mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
32c5722104
* [cfitsio] Update to 3.49 and fix dependency zlib * export unofficial cmake targets * [cfitsio] Fix file paths, export cmake targets * [cfitsio] Required cmake_policy CMP0012 * [ccfits] Fix dependency cfitsio * [cfitsio] Fixup pkgconfig * [healpix] Fix dependency cfitsio * [cfitsio] fix homepage and patches Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 6d6af49..9e7d2ee 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -94,9 +94,8 @@ IF (NOT MSVC)
|
|
|
|
# Find curl library, for HTTPS support:
|
|
IF (UseCurl)
|
|
- FIND_PACKAGE(CURL)
|
|
+ FIND_PACKAGE(CURL CONFIG REQUIRED)
|
|
IF (CURL_FOUND)
|
|
- INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
|
|
ADD_DEFINITIONS(-DCFITSIO_HAVE_CURL)
|
|
ENDIF()
|
|
ENDIF()
|
|
@@ -128,18 +127,20 @@ SET(SRC_FILES
|
|
|
|
# Only include zlib source files if we are building a shared library.
|
|
# Users will need to link their executable with zlib independently.
|
|
-IF (BUILD_SHARED_LIBS)
|
|
+IF (0)
|
|
set(SRC_FILES ${SRC_FILES}
|
|
zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c
|
|
zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c
|
|
zlib/uncompr.c zlib/zutil.c
|
|
)
|
|
+ELSE()
|
|
+ FIND_PACKAGE(ZLIB REQUIRED)
|
|
ENDIF()
|
|
|
|
ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES})
|
|
-TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB})
|
|
+TARGET_LINK_LIBRARIES(${LIB_NAME} ${PTHREADS_LIBRARY} ${M_LIB} ZLIB::ZLIB)
|
|
IF (CURL_FOUND)
|
|
- TARGET_LINK_LIBRARIES(${LIB_NAME} ${CURL_LIBRARIES})
|
|
+ TARGET_LINK_LIBRARIES(${LIB_NAME} CURL::libcurl)
|
|
ENDIF(CURL_FOUND)
|
|
|
|
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION} SOVERSION ${${PROJECT_NAME}_MAJOR_VERSION})
|