-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 6b39f0e4..76f69653 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -109,8 +109,7 @@ | ||
ENDIF() | ||
|
||
#Add custom CMake Module | ||
-SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/" | ||
- CACHE INTERNAL "Location of our custom CMake modules.") | ||
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/") | ||
|
||
# auto-configure style checks, other CMake modules. | ||
INCLUDE(CheckLibraryExists) | ||
@@ -681,10 +680,10 @@ | ||
# This script will attempt to determine the version of the HDF5 library programatically. | ||
## | ||
IF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR) | ||
- SET(HDF5_LIBRARIES ${HDF5_C_LIBRARY} ${HDF5_HL_LIBRARY}) | ||
- SET(HDF5_C_LIBRARIES ${HDF5_C_LIBRARY}) | ||
- SET(HDF5_C_LIBRARY_hdf5 ${HDF5_C_LIBRARY}) | ||
- SET(HDF5_HL_LIBRARIES ${HDF5_HL_LIBRARY}) | ||
+ SET(HDF5_LIBRARIES hdf5::hdf_c hdf5::hdf_hl) | ||
+ SET(HDF5_C_LIBRARIES hdf5::hdf_c) | ||
+ SET(HDF5_C_LIBRARY_hdf5 hdf5::hdf_c) | ||
+ SET(HDF5_HL_LIBRARIES hdf5::hdf_hl) | ||
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR}) | ||
MESSAGE(STATUS "Using HDF5 C Library: ${HDF5_C_LIBRARY}") | ||
MESSAGE(STATUS "Using HDF5 HL LIbrary: ${HDF5_HL_LIBRARY}") | ||
@@ -738,7 +737,7 @@ | ||
# examples, even though the previous version of what we | ||
# had worked. | ||
##### | ||
- IF(MSVC) | ||
+ IF(0) | ||
SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) | ||
FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE}) | ||
ELSE(MSVC) | ||
@@ -985,11 +984,10 @@ | ||
|
||
# See if we have libcurl | ||
FIND_PACKAGE(CURL) | ||
-ADD_DEFINITIONS(-DCURL_STATICLIB=1) | ||
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) | ||
|
||
# Define a test flag for have curl library | ||
-IF(CURL_LIBRARIES OR CURL_LIBRARY) | ||
+IF(CURL_LIBRARIES OR CURL_LIBRARIES) | ||
SET(FOUND_CURL TRUE) | ||
ELSE() | ||
SET(FOUND_CURL FALSE) | ||
@@ -2277,6 +2275,8 @@ | ||
##### | ||
SET(netCDF_LIB_CORENAME "netcdf") | ||
|
||
+add_subdirectory(liblib) | ||
+ | ||
##### | ||
# Set the true names of all the libraries, if customized by external project | ||
##### | ||
@@ -2334,8 +2334,6 @@ | ||
DESTINATION ${netCDF_BINARY_DIR}/nczarr_test/) | ||
ENDIF() | ||
|
||
-add_subdirectory(liblib) | ||
- | ||
IF(ENABLE_PLUGINS) | ||
add_subdirectory(plugins) | ||
ENDIF() | ||
@@ -2403,7 +2401,7 @@ | ||
# install them in the binary dir. Grab all of the .libs, put them | ||
# in the libdir. | ||
## | ||
-IF(MSVC) | ||
+IF(0) | ||
FILE(GLOB COPY_FILES ${CMAKE_PREFIX_PATH}/lib/*.lib) | ||
INSTALL(FILES ${COPY_FILES} | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
|
||
diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt | ||
index be72612c..e0edb4ca 100644 | ||
--- a/liblib/CMakeLists.txt | ||
+++ b/liblib/CMakeLists.txt | ||
@@ -116,7 +116,7 @@ | ||
# builds: | ||
# Make sure that HDF5_C_LIBRARY appears *after* | ||
# HDF5_HL_LIBRARY. | ||
- SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) | ||
+ SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) | ||
ELSE() # Windows CMake defines HDF5_LIBRARIES. | ||
SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) | ||
ENDIF() | ||
@@ -208,3 +208,5 @@ | ||
FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.c) | ||
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} CMakeLists.txt Makefile.am) | ||
ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") | ||
+ | ||
+SET(TLL_LIBS ${TLL_LIBS} PARENT_SCOPE) | ||
diff -ru a/libdap4/CMakeLists.txt b/libdap4/CMakeLists.txt | ||
--- a/libdap4/CMakeLists.txt 2021-08-19 01:49:05.000000000 +0800 | ||
+++ b/libdap4/CMakeLists.txt 2022-12-14 15:03:47.416608700 +0800 | ||
@@ -7,6 +7,7 @@ | ||
SET(dap4_SOURCES d4curlfunctions.c d4fix.c d4data.c d4file.c d4parser.c d4meta.c d4varx.c d4dump.c d4swap.c d4chunk.c d4printer.c d4read.c d4http.c d4util.c d4odom.c d4cvt.c d4debug.c ncd4dispatch.c) | ||
|
||
add_library(dap4 OBJECT ${dap4_SOURCES}) | ||
+target_link_libraries(dap4 ${TLL_LIBS}) | ||
|
||
### | ||
# Options related to the man page generation. | ||
|
||
diff -ru a/oc2/CMakeLists.txt b/oc2/CMakeLists.txt | ||
--- a/oc2/CMakeLists.txt 2021-08-19 01:49:05.000000000 +0800 | ||
+++ b/oc2/CMakeLists.txt 2022-12-14 15:05:29.788474600 +0800 | ||
@@ -8,6 +8,7 @@ | ||
|
||
|
||
add_library(oc2 OBJECT ${oc_SOURCES}) | ||
+target_link_libraries(oc2 ${TLL_LIBS}) | ||
|
||
# Apparently fails under cmake | ||
#set(ocprint_FILES ocprint.c ) |
17 changes: 17 additions & 0 deletions
17
recipes/netcdf/all/patches/4.9.2-0002-fix-cross-compile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index fd6713d..c6312b2 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1079,7 +1079,11 @@ | ||
|
||
# Check for the math library so it can be explicitly linked. | ||
IF(NOT WIN32) | ||
- FIND_LIBRARY(HAVE_LIBM NAMES math m libm) | ||
+ INCLUDE(CheckLibraryExists) | ||
+ CHECK_LIBRARY_EXISTS(m log "" CAN_LINK_LIBM) | ||
+ IF(CAN_LINK_LIBM) | ||
+ SET(HAVE_LIBM m) | ||
+ ENDIF() | ||
IF(NOT HAVE_LIBM) | ||
CHECK_FUNCTION_EXISTS(exp HAVE_LIBM_FUNC) | ||
IF(NOT HAVE_LIBM_FUNC) |