mirror of
https://github.com/glfw/glfw.git
synced 2025-04-10 23:31:55 +00:00
Merge 89d101550d
into e7ea71be03
This commit is contained in:
commit
2c96b27d42
1 changed files with 13 additions and 0 deletions
|
@ -361,3 +361,16 @@ if (GLFW_INSTALL)
|
|||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Link Time Optimization
|
||||
#--------------------------------------------------------------------
|
||||
if (BUILD_SHARED_LIBS AND ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.9.0")
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT result OUTPUT output)
|
||||
if(result)
|
||||
message(STATUS "glfw: Using IPO")
|
||||
set_property(TARGET glfw PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING "IPO is not supported: ${output}")
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
Loading…
Add table
Reference in a new issue