mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 13:46:37 +00:00
Conditionaly enables target_include_directories.
CMake's target_include_directories breaks compatibility with glfw's minimum required version. The command is now if-guarded for CMake <2.8.11.
This commit is contained in:
parent
6297f916a6
commit
e2ff064544
@ -59,7 +59,13 @@ endif()
|
|||||||
|
|
||||||
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
add_library(glfw ${glfw_SOURCES} ${glfw_HEADERS})
|
||||||
target_link_libraries(glfw ${glfw_LIBRARIES})
|
target_link_libraries(glfw ${glfw_LIBRARIES})
|
||||||
target_include_directories(glfw PUBLIC $<INSTALL_INTERFACE:${GLFW_INSTALL_INCLUDE_DIR}>)
|
if (NOT CMAKE_VERSION VERSION_LESS "2.8.11")
|
||||||
|
# CMake 2.8.11 introduced the target_include_directories command to
|
||||||
|
# include and/or export public, private, and interface include
|
||||||
|
# directories. TODO If/when cmake_minimum_required increases to
|
||||||
|
# >=2.8.11, call this command unconditionally.
|
||||||
|
target_include_directories(glfw PUBLIC $<INSTALL_INTERFACE:${GLFW_INSTALL_INCLUDE_DIR}>)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(glfw PROPERTIES
|
set_target_properties(glfw PROPERTIES
|
||||||
OUTPUT_NAME "${GLFW_LIB_NAME}"
|
OUTPUT_NAME "${GLFW_LIB_NAME}"
|
||||||
|
Loading…
Reference in New Issue
Block a user