Fix glog linking

This commit is contained in:
Carles Fernandez 2022-07-27 13:19:36 +02:00
parent aec51db2e0
commit dadfce626b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 17 additions and 10 deletions

View File

@ -2079,7 +2079,7 @@ if(NOT ARMADILLO_FOUND OR ENABLE_OWN_ARMADILLO)
PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64 PATHS ${CMAKE_SYSTEM_LIBRARY_PATH} /opt/local/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /opt/local/lib64
) )
if(ARPACK_LIBRARY) if(ARPACK_LIBRARY)
target_link_libraries(Armadillo::armadillo INTERFACE ARPACK_LIBRARY) target_link_libraries(Armadillo::armadillo INTERFACE ${ARPACK_LIBRARY})
endif() endif()
endif() endif()

View File

@ -31,7 +31,7 @@ find_path(LIBUNWIND_INCLUDE_DIR
find_library(LIBUNWIND_GENERIC_LIBRARY find_library(LIBUNWIND_GENERIC_LIBRARY
NAMES NAMES
libunwind.a libunwind
unwind unwind
HINTS HINTS
/usr /usr
@ -68,7 +68,7 @@ if(LIBUNWIND_INCLUDE_DIR)
if(LIBUNWIND_ARCH) if(LIBUNWIND_ARCH)
find_library(LIBUNWIND_SPECIFIC_LIBRARY find_library(LIBUNWIND_SPECIFIC_LIBRARY
NAMES NAMES
libunwind-${LIBUNWIND_ARCH}.a libunwind-${LIBUNWIND_ARCH}
"unwind-${LIBUNWIND_ARCH}" "unwind-${LIBUNWIND_ARCH}"
HINTS HINTS
/usr /usr
@ -113,13 +113,20 @@ if(LIBUNWIND_FOUND)
endif() endif()
if(LIBUNWIND_FOUND AND NOT TARGET Libunwind::libunwind) if(LIBUNWIND_FOUND AND NOT TARGET Libunwind::libunwind)
add_library(Libunwind::libunwind INTERFACE IMPORTED) if(LIBUNWIND_GENERIC_LIBRARY)
set_target_properties(Libunwind::libunwind PROPERTIES add_library(Libunwind::libunwind SHARED IMPORTED)
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" set_target_properties(Libunwind::libunwind PROPERTIES
IMPORTED_LOCATION "${LIBUNWIND_LIBRARIES}" IMPORTED_LINK_INTERFACE_LANGUAGES "CXX"
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNWIND_INCLUDE_DIR}" IMPORTED_LOCATION "${LIBUNWIND_GENERIC_LIBRARY}"
INTERFACE_LINK_LIBRARIES "${LIBUNWIND_LIBRARIES}" INTERFACE_INCLUDE_DIRECTORIES "${LIBUNWIND_INCLUDE_DIR}"
) INTERFACE_LINK_LIBRARIES "${LIBUNWIND_LIBRARIES}"
)
else()
add_library(Libunwind::libunwind INTERFACE IMPORTED)
set_target_properties(Libunwind::libunwind PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBUNWIND_INCLUDE_DIR}"
)
endif()
endif() endif()
set_package_properties(LIBUNWIND PROPERTIES set_package_properties(LIBUNWIND PROPERTIES