mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-27 08:01:04 +08:00
d7128d144b
* Add fetchcontent for compression libs and fix cmake config * MSDOS is a reserved define name * Add release note and update install doc for FetchContent * Add CI test for FetchContent * Use LINK_COMP_LIBS instead of STATIC_LIBRARY for depends * Use general link
60 lines
2.7 KiB
CMake
60 lines
2.7 KiB
CMake
#-----------------------------------------------------------------------------
|
|
# LIBAEC Config file for compiling against LIBAEC build directory
|
|
#-----------------------------------------------------------------------------
|
|
@PACKAGE_INIT@
|
|
|
|
string(TOUPPER @LIBAEC_PACKAGE@ LIBAEC_PACKAGE_NAME)
|
|
|
|
set (${LIBAEC_PACKAGE_NAME}_VALID_COMPONENTS static shared)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# User Options
|
|
#-----------------------------------------------------------------------------
|
|
set (${LIBAEC_PACKAGE_NAME}_ENABLE_ENCODING @LIBAEC_ENABLE_ENCODING@)
|
|
set (${LIBAEC_PACKAGE_NAME}_BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@)
|
|
set (${LIBAEC_PACKAGE_NAME}_EXPORT_LIBRARIES @LIBAEC_LIBRARIES_TO_EXPORT@)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Directories
|
|
#-----------------------------------------------------------------------------
|
|
set (${LIBAEC_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
|
|
|
|
set (${LIBAEC_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@")
|
|
set_and_check (${LIBAEC_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@")
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Version Strings
|
|
#-----------------------------------------------------------------------------
|
|
set (${LIBAEC_PACKAGE_NAME}_VERSION_STRING @LIBAEC_VERSION_STRING@)
|
|
set (${LIBAEC_PACKAGE_NAME}_VERSION_MAJOR @LIBAEC_VERSION_MAJOR@)
|
|
set (${LIBAEC_PACKAGE_NAME}_VERSION_MINOR @LIBAEC_VERSION_MINOR@)
|
|
|
|
#-----------------------------------------------------------------------------
|
|
# Don't include targets if this file is being picked up by another
|
|
# project which has already build LIBAEC as a subproject
|
|
#-----------------------------------------------------------------------------
|
|
if (NOT TARGET "@LIBAEC_PACKAGE@")
|
|
include (@PACKAGE_SHARE_INSTALL_DIR@/@LIBAEC_PACKAGE@@LIBAEC_PACKAGE_EXT@-targets.cmake)
|
|
endif ()
|
|
|
|
# Handle default component(static) :
|
|
if (NOT ${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS)
|
|
set (${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS static)
|
|
set (${LIBAEC_PACKAGE_NAME}_FIND_REQUIRED_static true)
|
|
endif ()
|
|
|
|
# Handle requested components:
|
|
list (REMOVE_DUPLICATES ${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS)
|
|
foreach (comp IN LISTS ${LIBAEC_PACKAGE_NAME}_FIND_COMPONENTS)
|
|
list (FIND ${LIBAEC_PACKAGE_NAME}_EXPORT_LIBRARIES "@LIBAEC_LIB_CORENAME@-${comp}" HAVE_COMP)
|
|
if (${HAVE_COMP} LESS 0)
|
|
set (${LIBAEC_PACKAGE_NAME}_${comp}_FOUND 0)
|
|
else ()
|
|
set (${LIBAEC_PACKAGE_NAME}_${comp}_FOUND 1)
|
|
string(TOUPPER ${LIBAEC_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
|
|
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @LIBAEC_LIB_CORENAME@-${comp})
|
|
endif ()
|
|
endforeach ()
|
|
|
|
check_required_components (${LIBAEC_PACKAGE_NAME})
|