DYT/Tool/OpenSceneGraph-3.6.5/share/libaec/libaec-config.cmake

41 lines
1.6 KiB
CMake
Raw Permalink Normal View History

2024-12-24 23:49:36 +00:00
# libaec-config.cmake
# ----------------
#
# Finds the AEC library, specify the starting search path in libaec_ROOT.
#
# Static vs. shared
# -----------------
# To make use of the static library instead of the shared one, one needs
# to set the variable libaec_USE_STATIC_LIBS to ON before calling find_package.
# Example:
# set(libaec_USE_STATIC_LIBS ON)
# find_package(libaec CONFIG)
#
# This will define the following variables:
#
# libaec_FOUND - True if the system has the AEC library.
# libaec_VERSION - The version of the AEC library which was found.
# SZIP_FOUND - True if the system has the SZIP library.
# SZIP_VERSION - The version of the SZIP library which was found.
# SZIP_LIBRARIES - All the required libraries to make use of SZIP.
#
# and the following imported targets:
#
# libaec::aec - The AEC library.
# libaec::sz - The SZIP compatible version of the AEC library.
find_path(libaec_INCLUDE_DIR NAMES libaec.h DOC "AEC include directory")
find_path(SZIP_INCLUDE_DIR NAMES szlib.h DOC "SZIP include directory")
if (libaec_USE_STATIC_LIBS)
if (MSVC)
find_library(libaec_LIBRARY NAMES aec-static.lib DOC "AEC library")
find_library(SZIP_LIBRARY NAMES szip-static.lib DOC "SZIP compatible version of the AEC library")
else ()
find_library(libaec_LIBRARY NAMES libaec.a DOC "AEC library")
find_library(SZIP_LIBRARY NAMES libsz.a DOC "SZIP compatible version of the AEC library")
endif ()
else ()
find_library(libaec_LIBRARY NAMES aec DOC "AEC library")
find_library(SZIP_LIBRARY NAMES sz szip DOC "SZIP compatible version of the AEC library")
endif ()