@ -25,6 +25,7 @@ option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
option ( GLFW_BUILD_TESTS "Build the GLFW test programs" ON )
option ( GLFW_BUILD_DOCS "Build the GLFW documentation" ON )
option ( GLFW_INSTALL "Generate installation target" ON )
option ( GLFW_VULKAN_STATIC "Use the Vulkan loader statically linked into application" OFF )
option ( GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF )
if ( WIN32 )
@ -57,6 +58,10 @@ else()
set ( GLFW_LIB_NAME glfw3 )
endif ( )
if ( GLFW_VULKAN_STATIC )
set ( _GLFW_VULKAN_STATIC 1 )
endif ( )
list ( APPEND CMAKE_MODULE_PATH "${GLFW_SOURCE_DIR}/CMake/modules" )
find_package ( Threads REQUIRED )
@ -148,6 +153,21 @@ else()
message ( FATAL_ERROR "No supported platform was detected" )
endif ( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# A d d V u l k a n s t a t i c l i b r a r y i f r e q u e s t e d
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ( GLFW_VULKAN_STATIC )
if ( VULKAN_FOUND AND VULKAN_STATIC_LIBRARY )
list ( APPEND glfw_LIBRARIES ${ VULKAN_STATIC_LIBRARY } )
else ( )
if ( BUILD_SHARED_LIBS OR GLFW_BUILD_EXAMPLES OR GLFW_BUILD_TESTS )
message ( FATAL_ERROR "Vulkan loader static library not found" )
else ( )
message ( WARNING "Vulkan loader static library not found" )
endif ( )
endif ( )
endif ( )
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# F i n d a n d a d d U n i x m a t h a n d t i m e l i b r a r i e s
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -