mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
tymczasowe przywrócenie tekstu, porządek, wywalenie starych plików, warningi, cmake, itp.
This commit is contained in:
75
CMake_modules/FindGLFW3.cmake
Normal file
75
CMake_modules/FindGLFW3.cmake
Normal file
@@ -0,0 +1,75 @@
|
||||
# - Try to find GLFW3
|
||||
#
|
||||
# If no pkgconfig, define GLFW_ROOT to installation tree
|
||||
# Will define the following:
|
||||
# GLFW3_FOUND
|
||||
# GLFW3_INCLUDE_DIR
|
||||
# GLFW3_LIBRARIES
|
||||
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
IF(APPLE)
|
||||
# homebrew or macports pkgconfig locations
|
||||
SET(ENV{PKG_CONFIG_PATH} "/usr/local/opt/glfw3/lib/pkgconfig:/opt/local/lib/pkgconfig")
|
||||
ENDIF()
|
||||
SET(ENV{PKG_CONFIG_PATH} "${DEPENDS_DIR}/glfw/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
|
||||
PKG_CHECK_MODULES(GLFW3 glfw3)
|
||||
|
||||
FIND_LIBRARY(GLFW3_LIBRARY
|
||||
NAMES ${GLFW3_LIBRARIES}
|
||||
HINTS ${GLFW3_LIBRARY_DIR}
|
||||
)
|
||||
SET(GLFW3_LIBRARIES ${GLFW3_LIBRARY})
|
||||
|
||||
RETURN()
|
||||
ENDIF()
|
||||
|
||||
FIND_PATH(GLFW3_INCLUDE_DIR
|
||||
GLFW/glfw3.h
|
||||
DOC "GLFW include directory "
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
# directories in the official binary package
|
||||
IF(MINGW)
|
||||
SET(_SUFFIX lib-mingw)
|
||||
ELSEIF(MSVC11)
|
||||
SET(_SUFFIX lib-vc2012)
|
||||
ELSEIF(MSVC12)
|
||||
SET(_SUFFIX lib-vc2013)
|
||||
ELSEIF(MSVC14)
|
||||
SET(_SUFFIX lib-vc2015)
|
||||
ELSEIF(MSVC)
|
||||
SET(_SUFFIX lib-vc2012)
|
||||
ENDIF()
|
||||
|
||||
FIND_LIBRARY(GLFW3_LIBRARIES
|
||||
NAMES glfw3dll glfw3
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
lib
|
||||
${_SUFFIX}
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
FIND_FILE(GLFW3_DLL
|
||||
glfw3.dll
|
||||
PATHS
|
||||
"${DEPENDS_DIR}/glfw"
|
||||
"$ENV{ProgramW6432}/glfw"
|
||||
${GLFW3_ROOT_PATH}
|
||||
PATH_SUFFIXES
|
||||
${_SUFFIX}
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW3 FOUND_VAR GLFW3_FOUND
|
||||
REQUIRED_VARS GLFW3_LIBRARIES GLFW3_INCLUDE_DIR)
|
||||
Reference in New Issue
Block a user