mirror of https://github.com/mosra/magnum.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
|
16 years ago
|
# Find Magnum - Magnum handling module for CMake
|
||
|
|
#
|
||
|
|
# This module defines:
|
||
|
|
#
|
||
|
|
# MAGNUM_FOUND - True if Magnum library is found
|
||
|
|
# MAGNUM_INCLUDE_DIR - Include dir for Magnum
|
||
|
|
# MAGNUM_LIBRARY - Magnum library
|
||
|
|
#
|
||
|
|
# MAGNUM_LIBRARY_INSTALL_DIR - Library installation directory
|
||
|
|
# MAGNUM_CMAKE_MODULE_INSTALL_DIR - Installation dir for CMake modules
|
||
|
|
# MAGNUM_INCLUDE_INSTALL_DIR - Include installation directory for headers
|
||
|
|
#
|
||
|
|
|
||
|
|
include(MagnumMacros)
|
||
|
|
|
||
|
|
if (MAGNUM_INCLUDE_DIR AND MAGNUM_LIBRARY)
|
||
|
|
|
||
|
|
# Already in cache
|
||
|
|
set(MAGNUM_FOUND TRUE)
|
||
|
|
|
||
|
|
else()
|
||
|
|
# Libraries
|
||
|
|
find_library(MAGNUM_LIBRARY Magnum)
|
||
|
|
|
||
|
|
# Paths
|
||
|
|
find_path(MAGNUM_INCLUDE_DIR
|
||
|
|
NAMES Magnum.h
|
||
|
|
PATH_SUFFIXES Magnum
|
||
|
|
)
|
||
|
|
|
||
|
|
include(FindPackageHandleStandardArgs)
|
||
|
|
find_package_handle_standard_args("Magnum" DEFAULT_MSG
|
||
|
|
MAGNUM_INCLUDE_DIR
|
||
|
|
MAGNUM_LIBRARY
|
||
|
|
)
|
||
|
|
|
||
|
|
endif()
|
||
|
|
|
||
|
|
# Installation dirs
|
||
|
|
set_parent_scope(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
|
||
|
|
set_parent_scope(MAGNUM_CMAKE_MODULE_INSTALL_DIR ${CMAKE_ROOT}/Modules)
|
||
|
|
set_parent_scope(MAGNUM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum)
|