Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: Check environment variable DENG_DEPEND_PATH; cleanup
cotire is now disabled by default if ccache is found.
- Loading branch information
Showing
10 changed files
with
51 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
find_package (OpenGL REQUIRED) | ||
|
||
if (NOT TARGET opengl) | ||
find_file (OPENGL_GLEXT_H GL/glext.h | ||
HINTS ${OPENGL_DIR} | ||
PATH_SUFFIXES .. OpenGL include OpenGL/include | ||
) | ||
mark_as_advanced (OPENGL_GLEXT_H) | ||
if (NOT OPENGL_GLEXT_H) | ||
message (FATAL_ERROR "OpenGL \"GL/glext.h\" header not found. Set the OPENGL_DIR variable to specify the location of the OpenGL headers.") | ||
endif () | ||
add_library (opengl INTERFACE) | ||
|
||
if (NOT OPENGL_INCLUDE_DIR) | ||
# Let's look manually. | ||
find_file (OPENGL_GLEXT_H GL/glext.h | ||
PATHS ${OPENGL_DIR} | ||
HINTS ${OPENGL_LIBRARIES} ENV DENG_DEPEND_PATH | ||
PATH_SUFFIXES .. OpenGL include OpenGL/include Headers | ||
) | ||
mark_as_advanced (OPENGL_GLEXT_H) | ||
if (NOT OPENGL_GLEXT_H) | ||
message (FATAL_ERROR "OpenGL \"GL/glext.h\" header not found. Set the OPENGL_DIR variable to specify the location of the OpenGL headers.") | ||
endif () | ||
|
||
get_filename_component (glIncDir ${OPENGL_GLEXT_H} DIRECTORY) | ||
get_filename_component (glIncDir ${OPENGL_GLEXT_H} DIRECTORY) | ||
target_include_directories (opengl INTERFACE ${glIncDir}/..) | ||
else () | ||
target_include_directories (opengl INTERFACE ${OPENGL_INCLUDE_DIR}) | ||
endif () | ||
|
||
add_library (opengl INTERFACE) | ||
target_include_directories (opengl INTERFACE ${OPENGL_INCLUDE_DIR} ${glIncDir}/..) | ||
target_link_libraries (opengl INTERFACE ${OPENGL_LIBRARIES}) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters