Skip to content

Commit 7ff8208

Browse files
committed
Try to fix static build 6
1 parent b97579e commit 7ff8208

File tree

1 file changed

+1
-55
lines changed

1 file changed

+1
-55
lines changed

dynadjust/CMakeLists.txt

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -576,61 +576,7 @@ if(BUILD_STATIC)
576576
message("")
577577
message(STATUS "STATIC_LIBS_LIST=${STATIC_LIBS_LIST}")
578578

579-
# Find static versions of xerces-c dependencies (curl and ICU)
580-
find_library(CURL_STATIC_LIB NAMES libcurl.a HINTS
581-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
582-
find_library(ICUUC_STATIC_LIB NAMES libicuuc.a HINTS
583-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
584-
find_library(ICUI18N_STATIC_LIB NAMES libicui18n.a HINTS
585-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
586-
find_library(ICUDATA_STATIC_LIB NAMES libicudata.a HINTS
587-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
588-
find_library(SSL_STATIC_LIB NAMES libssl.a HINTS
589-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
590-
find_library(CRYPTO_STATIC_LIB NAMES libcrypto.a HINTS
591-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
592-
find_library(Z_STATIC_LIB NAMES libz.a HINTS
593-
ENV LIBRARY_PATH /g/data/ms9/.envbin/lib /usr/lib64 /usr/lib)
594-
595-
# Build the list of xerces-c dependencies, preferring static
596-
set(XERCES_DEPS "")
597-
598-
# ICU libraries (order matters: i18n depends on uc, both depend on data)
599-
if(ICUI18N_STATIC_LIB AND ICUUC_STATIC_LIB AND ICUDATA_STATIC_LIB)
600-
message(STATUS "Found static ICU: ${ICUUC_STATIC_LIB}")
601-
list(APPEND XERCES_DEPS ${ICUI18N_STATIC_LIB} ${ICUUC_STATIC_LIB} ${ICUDATA_STATIC_LIB})
602-
else()
603-
message(STATUS "Static ICU not found, using dynamic")
604-
list(APPEND XERCES_DEPS -licui18n -licuuc -licudata)
605-
endif()
606-
607-
# curl and its dependencies
608-
if(CURL_STATIC_LIB)
609-
message(STATUS "Found static curl: ${CURL_STATIC_LIB}")
610-
list(APPEND XERCES_DEPS ${CURL_STATIC_LIB})
611-
# curl's dependencies
612-
if(SSL_STATIC_LIB AND CRYPTO_STATIC_LIB)
613-
message(STATUS "Found static OpenSSL")
614-
list(APPEND XERCES_DEPS ${SSL_STATIC_LIB} ${CRYPTO_STATIC_LIB})
615-
else()
616-
list(APPEND XERCES_DEPS -lssl -lcrypto)
617-
endif()
618-
if(Z_STATIC_LIB)
619-
message(STATUS "Found static zlib: ${Z_STATIC_LIB}")
620-
list(APPEND XERCES_DEPS ${Z_STATIC_LIB})
621-
else()
622-
list(APPEND XERCES_DEPS -lz)
623-
endif()
624-
# Other curl deps that are usually only available as shared
625-
list(APPEND XERCES_DEPS -lnghttp2 -lidn2 -lssh -lpsl -lbrotlidec -lbrotlicommon)
626-
else()
627-
message(STATUS "Static curl not found, using dynamic")
628-
list(APPEND XERCES_DEPS -lcurl)
629-
endif()
630-
631-
# Set DNA_LIBRARIES with all dependencies
632-
# System libs at the end
633-
set(DNA_LIBRARIES ${STATIC_LIBS_LIST} ${XERCES_DEPS} -lpthread -lrt -lm -ldl)
579+
set(DNA_LIBRARIES ${STATIC_LIBS_LIST} -lpthread -lrt -lm -ldl)
634580

635581
# Print sizes of static libraries
636582
message(STATUS "")

0 commit comments

Comments
 (0)