Commit fd737fa5 authored by Nick Sharp's avatar Nick Sharp
Browse files

Fall back to manual dependency resolution

parent 7aa827fe
# Find CMU462 library and include paths
# This defines the following:
#
# CMU462_FOUND If CMU462 is found
# CMU462_LIBRARIES CMU462 libraries
# CMU462_INCLUDE_DIRS CMU462 include directories
# CMU462_LIBRARY_DIRS CMU462 library directories
if(UNIX)
set(CMU462_INC_NAMES CMU462.h)
set(CMU462_LIB_NAMES libCMU462.a)
if(APPLE)
set(CMU462_LIB_NAMES libCMU462_osx.a)
endif(APPLE)
endif(UNIX)
# CMU462 static library
find_library(CMU462_LIBRARIES
NAMES ${CMU462_LIB_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../lib
DOC "CMU462 library")
# CMU462 library dir
find_path(CMU462_LIBRARY_DIRS
NAMES ${CMU462_LIB_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../lib
DOC "462 include directories")
# CMU462 include dir
find_path(CMU462_INCLUDE_DIRS
NAMES ${CMU462_INC_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../include/
DOC "462 include directories")
# Version
set(CMU462_VERSION 1.0)
# Set package standard args
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CMU462
REQUIRED_VARS CMU462_INCLUDE_DIRS CMU462_LIBRARY_DIRS CMU462_LIBRARIES
VERSION_VAR CMU462_VERSION)
# Find GLEW library and include paths for CMU462
# This defines the following:
#
# GLEW_FOUND If GLEW is found
# GLEW_LIBRARIES GLEW libraries
# GLEW_INCLUDE_DIRS GLEW include directories
# GLEW_LIBRARY_DIRS GLEW library directories
if(UNIX)
set(GLEW_INC_NAMES glew.h)
set(GLEW_LIB_NAMES libglew.a)
if(APPLE)
set(GLEW_LIB_NAMES libglew_osx.a)
endif(APPLE)
endif(UNIX)
# GLEW static library
find_library(GLEW_LIBRARIES
NAMES ${GLEW_LIB_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../lib
DOC "GLEW library")
# GLEW library dir
find_path(GLEW_LIBRARY_DIRS
NAMES ${GLEW_LIB_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../lib
DOC "462 include directories")
# GLEW include dir
find_path(GLEW_INCLUDE_DIRS
NAMES ${GLEW_INC_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../include/GLEW
DOC "462 include directories")
# Version
set(GLEW_VERSION 1.13.0)
# Set package standard args
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW
REQUIRED_VARS GLEW_LIBRARIES GLEW_INCLUDE_DIRS GLEW_LIBRARY_DIRS
VERSION_VAR GLEW_VERSION)
# Find GLFW library and include paths for CMU462
# This defines the following:
#
# GLFW_FOUND If GLFW is found
# GLFW_LIBRARIES GLFW libraries
# GLFW_INCLUDE_DIRS GLFW include directories
# GLFW_LIBRARY_DIRS GLFW library directories
if(UNIX)
set(GLFW_INC_NAMES glfw.h)
set(GLFW_LIB_NAMES libglfw.a)
if(APPLE)
set(GLFW_LIB_NAMES libglfw_osx.a)
endif(APPLE)
endif(UNIX)
# GLFW static library
find_library(GLFW_LIBRARIES
NAMES ${GLFW_LIB_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../lib
DOC "GLFW library")
# GLFW library dir
find_path(GLFW_LIBRARY_DIRS
NAMES ${GLFW_LIB_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../lib
DOC "462 include directories")
# GLFW include dir
find_path(GLFW_INCLUDE_DIRS
NAMES ${GLFW_INC_NAMES}
PATHS ${PROJECT_SOURCE_DIR}/../include/GLFW
DOC "462 include directories")
# Version
set(GLFW_VERSION 3.1.1)
# Set package standard args
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW
REQUIRED_VARS GLFW_LIBRARIES GLFW_INCLUDE_DIRS GLFW_LIBRARY_DIRS
VERSION_VAR GLFW_VERSION)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment